Official sources reviewed
| Primary source | What it establishes | Review date |
|---|---|---|
| docx.js documentation | Published JavaScript DOCX generation API and examples. | 2026-07-22 |
What this decision is actually about
The split is not about which library can make paragraphs and tables. Both can. The real difference is whether Word should calculate layout when the file opens, or whether the engine should know about pagination before the recipient ever sees the document.
Evaluation prompts—not a feature scorecard
| Alternative boundary | Confirm the supported input, deployment, and output behavior in the official source above using your current version. |
| PaperJSX boundary | Prove one real artifact locally first; local package behavior does not imply hosted access. |
| Delivery decision | Test the native file, recipient handoff, and release check that matter in your product. |
When PaperJSX is the better fit
Choose PaperJSX when the output needs pagination-aware behavior, template hydration, or higher-level document workflows that are painful to bolt onto a low-level DOCX builder.
When docx is the better fit
If the documents are simple enough that Word calculating layout on open is acceptable, the docx library provides a mature low-level builder.
Cost of choosing PaperJSX
The docx library has broader low-level OOXML primitives including content controls in the free tier. Teams that only need basic document assembly without pagination may not need PaperJSX yet.
Evaluate the file your customer receives.
Bring one real payload, its expected file, and the release check you cannot miss. Pro and Platform are self-serve; contact us when the evaluation requires Enterprise terms or architecture review.