Library and CLI for converting DOCX files to PDF, matching Microsoft Word's output as closely as possible
open sourceApache-2.0self-hostablefree
docxide-pdf is a Rust library and command-line tool that converts Word .docx files to PDF with its own layout engine, aiming for the PDF Microsoft Word itself would export, without Word or LibreOffice installed. It embeds and subsets fonts, lays out tables, lists, floating images, charts, equations, headers, footers and footnotes, and writes tagged PDFs meant to pass the same PDF/UA checks as Word's export. Tracked changes print as the final text by default; --markup (or DOCXIDE_REVISIONS=markup) prints Word's All Markup view, with insertions underlined, deletions struck through in each author's colour and change bars in the margin. The README calls it a work in progress, scores it against Word, LibreOffice and other converters on a public comparison page, and says most of its code is written by Claude models under human direction.
Problems it solves
- convert Word documents to PDF in a Linux container without installing LibreOffice
- print a contract with tracked changes to PDF showing the insertions and deletions as redlines
- our DOCX to PDF conversion shifts page breaks compared with what Word exports
- turn a .docx into a PDF from Rust code entirely in memory, bytes in and bytes out
- generate accessible tagged PDFs from Word files that pass PDF/UA checks
- fill a Word template and produce a PDF in a single self-contained Rust binary
- convert DOCX to PDF in milliseconds instead of spawning an office suite per document
- render Word files with charts, equations and floating images to PDF on a server with no Office licence
- make the PDFs we generate from Word documents use the same fonts on every machine
- show reviewers a PDF of a Word document with change bars in the margin
Features
- DOCX to PDF conversion with its own layout engine, no Word or LibreOffice needed
- tracked changes as the final view (default) or Word's All Markup view with --markup
- font embedding and subsetting, with fonts embedded in the DOCX extracted and used first
- tables, lists, sections, multi-column layout, headers, footers, footnotes and endnotes
- floating images, text boxes, WordArt, all 187 preset shapes and SmartArt from its drawing fallback
- bar, line, pie, area, scatter and Office 2016 charts, and Office Math equations
- comments in Word's right-hand review pane
- tagged PDF structure, language and XMP metadata, PDF/UA-1 claimed when the document allows
- in-memory conversion API (bytes to bytes) and ConvertOptions or DOCXIDE_* environment settings
- builds for wasm32-unknown-unknown as a Rust library
View 1 more
- public side-by-side comparison against Word, LibreOffice and other converters
Limitations
- Doesn't draw revision balloons for tracked changes: the --markup view shows every revision inline1
- Doesn't shape complex scripts such as Devanagari or Thai: only Arabic joining is supported beyond simple scripts1
- Doesn't bundle fallback fonts: without the document's fonts installed, Arial, Liberation Sans, DejaVu Sans or Helvetica stand in1
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what docxide-pdf does.
- LibreOffice Free and private office suite, no forced AI
- rdocx Native DOCX creation, editing, comparison, layout, and rendering
- jubarte Word-faithful DOCX redlines and rendering, without Word
- Gotenberg A Docker-based API for PDF
- Aspose.Words Create, edit, render and convert Word documents to multiple formats without using external software
