@paperjsx/json-to-pdf
v0.4.0
Published
Generate PDF files from JSON
Downloads
343
Maintainers
Readme
PaperJSX PDF Pro
Generate production PDF files from JSON and TypeScript with the paid PaperJSX PDF engine.
Install
npm install @paperjsx/json-to-pdf-proRequires Node.js >=18 and a valid PAPERJSX_LICENSE_KEY.
Quick Start
import { PdfEngine } from "@paperjsx/json-to-pdf-pro";
import { writeFileSync } from "node:fs";
process.env.PAPERJSX_LICENSE_KEY ??= "<your-license-key>";
const buffer = await PdfEngine.render({
meta: { title: "Signed Statement" },
page: { size: "Letter", margin: 48 },
children: [
{ type: "heading", value: "Signed Statement" },
{ type: "paragraph", value: "This document was generated with PaperJSX PDF Pro." },
],
});
writeFileSync("statement.pdf", buffer);Included In Pro
- production/self-hosted commercial PDF usage
- advanced typography and shaping
- streaming generation helpers
- digital signatures, document timestamps, and quality/reporting workflows
Core API
PdfEngine.render(document, options?)PdfEngine.renderStream(document, options?)
Links
- Docs: paperjsx.com/docs
- Pricing: paperjsx.com/pricing
License
Commercial license required. See the packaged LICENSE file.
