Use it in your application
Available as a TypeScript package for Node.js.
Installs the converter and its required core dependency. Production use requires a Pro license.
Searchable PDF with embedded fonts, comments, and tracked changes.
Available as a TypeScript package for Node.js.
Installs the converter and its required core dependency. Production use requires a Pro license.
Convert DOCX files to PDF on your Node.js server. Use the same fonts and layout settings as the editor to keep page breaks consistent.
Search, select, and copy text. The PDF embeds the fonts used for layout.
Configure fonts→Comments become PDF annotations. Set displayMode to 'proposed', 'original', or 'all-markup' to control how tracked changes appear.
Strict mode rejects unsupported or approximate output. Best-effort mode returns available output with diagnostics.
Review diagnostics→The converter and editor share a layout engine. Use the same fonts and layout settings to keep page breaks consistent between the preview and PDF.
Convert on the server. The client sends DOCX bytes and receives a PDF.
Supply the fonts used in your documents. Disable system fonts to keep font selection consistent across servers.
Configure PDF fontsConvert the request body in a Node.js route. Set limits for page count, output size, and conversion time.
Integrate PDF conversionOpen the document once and export both formats from the same layout.
Compare PDF and MarkdownPass DOCX bytes to exportPdf and save result.bytes. Use displayMode and comments to configure review content.
Check result.diagnostics for output limitations. Strict mode rejects unsupported or approximate output.
import { readFile, writeFile } from 'node:fs/promises';
import { exportPdf } from '@docx-editor.dev/docx-to-pdf';
const bytes = await readFile('document.docx');
const result = await exportPdf(bytes, {
displayMode: 'proposed',
comments: true,
});
await writeFile('document.pdf', result.bytes);
console.log(result.pageCount, result.diagnostics);Contracts and legal
Export a contract with or without markup. Keep comments as annotations.
Document generation
Fill a Word template with the editing API, then convert it to PDF in the same process.
Archives and records
Save a PDF with each document version. Record package versions and font settings to reproduce it.
Install @docx-editor.dev/docx-to-pdf and @docx-editor.dev/core. Pass the file bytes to exportPdf and write result.bytes to a .pdf file.
Yes. The converter runs inside your Node.js process with WebAssembly and packaged fonts. You do not run Word, a headless browser, or a separate conversion service.
Yes. Use a Node.js runtime and bundle the converter's WebAssembly and font assets. Configure memory and timeouts for your largest documents. Edge runtimes are not supported.
Yes. Use the Node.js runtime and add the converter packages to serverExternalPackages. Edge and browser runtimes are not supported.
Not always. Missing fonts and unsupported content, such as charts, can affect conversion. Compare representative files against Word page by page, and check result.diagnostics.
No. Inspect result.fontResolution for font substitutions. Strict PDF fidelity mode rejects generic substitutions that can change page breaks.
The converter supports tables and page breaks. Unsupported content, such as rotated table-cell text, causes strict conversion to fail or produces diagnostics in best-effort mode.
Yes. Fill the template with the document editing API, then pass the saved bytes to exportPdf in the same process.
No. Save it as .docx first. The converter accepts only .docx files.
Evaluation is free. Production use requires a Pro license. See pricing.
Yes. The editor posts the document to your conversion route. For more information, see Export Markdown and PDF.
Try docx-to-pdf.dev or add the package to your Node.js server.
Need text for agents or search? Convert Word to Markdown.