nebula-pdf-engine
v1.1.4
Published
[](https://www.npmjs.com/package/nebula-pdf-engine) [](LICENSE)
Maintainers
Readme
Nebula PDF Engine
Server-side PDF generation from React/JSX and Flexbox — without Headless Chrome. Powered by Satori, Resvg, and pdf-lib. Ideal for invoices, reports, and labels at the edge.
Docs: https://nebula-pdf.angojay.com/
npm install nebula-pdf-engine
npm install -D preactimport { PdfEngine, Page, Text } from 'nebula-pdf-engine';
import * as fs from 'fs';
const engine = new PdfEngine({
fonts: [{ name: 'Inter', data: fs.readFileSync('./fonts/Inter-Regular.ttf'), weight: 400 }],
});
const pdf = await engine.generate(
<Page size="A4" padding={40}>
<Text style={{ fontSize: 24 }}>Hello Nebula!</Text>
</Page>,
);
fs.writeFileSync('output.pdf', pdf);Set "jsxImportSource": "preact" in tsconfig.json. See Quick Start for full setup.
Learn more
| Topic | Doc | | --- | --- | | Why Nebula PDF? | guides/why-nebula | | Tables | guides/tables | | Examples (CodeSandbox) | examples/ · guides/examples | | Layout engine | architecture/layout-engine | | NestJS | frameworks/nestjs | | API | api/components |
License
MIT
