Hydra Doc Importer

Description

Hydra Doc Importer imports a Word (.docx) or text PDF file into WordPress as a draft post or page made of standard Gutenberg blocks, and exports any post or page to Markdown.

Use it when your content already lives in documents and you are tired of pasting from Word and fixing the formatting by hand.

Typical uses

  • Move a set of Word articles written by authors or clients into WordPress without copy and paste.
  • Turn a text PDF (a report, a guide, a handout) into an editable post.
  • Import a whole folder of .docx files in one go: each file becomes its own draft.
  • Export a post to a Markdown file to archive it, move it to a static site, or give it to an AI assistant.

Import features

  • Word (.docx): headings, paragraphs, bold, italic, strikethrough, superscript, links, bulleted and numbered lists (nested too), tables, quotes and images. Images are saved in your Media Library with their alt text.
  • Text PDF: the text layer is read and rebuilt as paragraphs, headings and lists.
  • Standard blocks only: Paragraph, Heading, List, Table, Image and Quote. No custom blocks, so your content stays editable if you remove the plugin.
  • Draft first: you get a draft post or page to review before publishing. The first title of the document becomes the post title.
  • Batch import: select several files at once, each becomes its own draft.
  • Block editor sidebar: import a file into the post you are editing.
  • Works on shared hosting: pure PHP, no command line tool, no external service for the import itself.

Markdown export features

  • Export any post or page to a .md file with a small front matter (title, date, URL).
  • A “Markdown” link under each item in the Posts and Pages lists.
  • A Hydra Doc Importer sidebar in the block editor to download the .md file or copy the Markdown.
  • Images are exported as Markdown image links to your Media Library files.

Privacy

Your documents are processed on your own server and are never sent anywhere. The plugin stores only a small _hydradoc_source post meta with the original file name. The only external service is the optional Freemius opt-in described under External services.

More about the project: https://hackthehydra.com/

Limits

Please read these before importing important content.

  • A PDF has no real structure: headings and lists are guessed from line spacing, dashes and numbering. Always read the draft before publishing.
  • PDF tables and images are not imported (Word tables and images are).
  • PDF with two columns: the reading order can be wrong. Bullets drawn with a special font can be lost.
  • Scanned PDFs and images (no text layer) are refused with a message: there is no OCR.
  • Footnotes, text boxes, headers and footers of Word files are ignored.
  • Very complex Word files can give a less tidy result than simple ones. Try a few of your own documents first.
  • Files must be at most 20 MB (or your server upload limit if smaller).

External services

The plugin makes no external request until you opt in. It includes the Freemius SDK, which is used to offer the optional Pro upgrade and licensing.

  • On activation, Freemius shows an opt-in screen. You can click “Skip”: nothing is then sent and the plugin works fully.
  • If you opt in, Freemius receives your WordPress user’s email address and name, the site URL, WordPress / PHP / plugin versions, the active theme and plugin list, and the language, so it can provide updates, security notices and usage statistics. You can opt out at any time.
  • Your documents and your posts are never sent to Freemius.
  • Service: Freemius, https://freemius.com. Terms: https://freemius.com/terms/. Privacy policy: https://freemius.com/privacy/.

Third party libraries

  • smalot/pdfparser 2.x, LGPL-3.0, https://github.com/smalot/pdfparser (included in the vendor folder, unmodified).
  • symfony/polyfill-mbstring 1.x, MIT, https://github.com/symfony/polyfill (included in the vendor folder, unmodified).

Screenshots

Installation

  1. Upload the plugin folder to /wp-content/plugins/, or install it from the Plugins screen.
  2. Activate it.
  3. Go to Tools > Hydra Doc Importer, choose one or several .docx or PDF files and click “Import as draft”.

FAQ

How do I import a Word document into WordPress?

Go to Tools > Hydra Doc Importer, choose your .docx file and click “Import as draft”. You are taken to a new draft made of Gutenberg blocks. You can also use the Hydra Doc Importer sidebar in the block editor to import a file into the post you are editing.

Does it keep images and tables from my Word file?

Yes. Tables become Table blocks. Images are added to the Media Library and inserted as Image blocks, with their alt text when the document has one. Footnotes, text boxes, headers and footers are ignored.

Does it work with the block editor (Gutenberg)?

Yes. The result is made only of core blocks (Paragraph, Heading, List, Table, Image, Quote), and the editor has a Hydra Doc Importer sidebar. It does not create custom blocks.

Can I import several files at once?

Yes. Select several .docx or PDF files in the file field. Each file becomes its own draft.

Can I import a PDF?

Yes, if it has a text layer (you can select the text in a PDF reader). The text is rebuilt as paragraphs, headings and lists, but a PDF only stores where each line sits on the page, so headings and lists are guessed. PDF tables and images are not imported.

Does it work with scanned PDFs?

No. A scanned PDF has no text layer and would need OCR, which this plugin does not do. It is refused with a clear message.

Does it upload my file to a third party?

No. Your file is never uploaded anywhere. It is processed on your own server.

How do I export a post to Markdown?

In the Posts or Pages list, click the “Markdown” link under the title. In the block editor, open the Hydra Doc Importer sidebar and click the download button, or copy the Markdown. The file starts with a small front matter (title, date, URL).

Does the Markdown export include images?

Yes, as Markdown image links to your Media Library files. The image files themselves are not put in the .md file.

The headings of my PDF are wrong.

PDF files only store where each line is on the page. The plugin guesses headings from the spacing, so a PDF with an unusual layout may need a quick manual fix.

Which blocks are created?

Only WordPress core blocks: Paragraph, Heading, List, Table, Image and Quote.

Who can import and export?

Users who can edit posts and upload files can import. Exporting needs the right to edit the post.

What is the maximum file size?

20 MB, or your server upload limit if it is smaller.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Hydra Doc Importer” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Hydra Doc Importer” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.1.0

  • Adds optional Pro upgrade via Freemius. Opt-in usage tracking prompt on activation, can be skipped.

1.0.0

  • First release: .docx and text PDF import (one or several files at once), Media Library images, Markdown export, block editor sidebar.