Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

AI Automator Pandoc

5 sites No security coverage

Part of the AI ecosystem · 302 projects

View on drupal.org

This plugin automatically converts uploaded documents like Word, PDF, and RTF files into clean HTML when a node is saved. The converted HTML is then placed into a text field, streamlining document processing without custom code.

An AI Automators plugin that converts uploaded Word (.docx), PDF, ODT, and RTF files to clean HTML using the pandoc command-line tool.

Once configured, the automator runs automatically when a node is saved, writing the converted HTML into any text_long target field — no custom code required.

Features

  • Converts Word (.docx / .doc), PDF, ODT, RTF, HTML, and plain text files to HTML5 or HTML4
  • Input format is detected automatically from the file MIME type and extension
  • Configurable output options: text wrapping, standalone document wrapper, embedded resources (base64 images), section numbering, table of contents, and freeform extra pandoc arguments
  • Uses proc_open() with an argument array — no shell injection risk
  • Settings form at /admin/config/content/pandoc with live pandoc version display and validation
  • Appears in the Drupal status report with OK / Warning / Error indicators
  • Post-install warning banner with a direct link to the configuration page
  • Drush command drush ai-automator-pandoc:test for command-line testing and diagnosis

Requirements

  • Drupal 10.4, 11, or 12
  • AI module with the AI Automators sub-module enabled
  • pandoc installed on the server and the binary path configured in the module settings

Installation

drush en ai_automator_pandoc

After enabling, visit Administration → Content authoring → Pandoc settings and enter the full path to the pandoc binary (e.g. /usr/local/bin/pandoc). Run which pandoc on the server to find the correct path.

Installing pandoc

  • macOS (Homebrew): brew install pandoc
  • Ubuntu / Debian: sudo apt-get install pandoc
  • Alpine Linux / Docker: apk add --no-cache pandoc
  • RHEL / CentOS: sudo yum install pandoc
  • Windows: download the installer from pandoc.org/installing.html

Docker note: images based on Alpine Linux use apk, not apt-get. Use apk add --no-cache pandoc or add it to your Dockerfile.

Drush test command

The module ships with a Drush command for end-to-end testing of the conversion without going through the UI:

drush ai-automator-pandoc:test /path/to/document.docx

The command prints the resolved pandoc path, version, exit code, conversion time, and an HTML preview. Use --save to write the full HTML output next to the source file.

Related modules

  • AI — required base module and automator framework
  • Doc HTML Chunker — splits the converted HTML into JSON-encoded chunks for AI processing
  • AI Document Proofreader — full node-based AI proofreading workflow using this module for document conversion

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0-rc1 Pre-release 10–11 Mar 9, 2026
1.0.x-dev Dev 10–11 Mar 9, 2026