Choose your package manager and install the package.
npm install @imggion/html2realpdfImport from the package root
Use the public root export. Do not import files from dist.
import {
createRenderer,
renderPdf,
type RenderOptions,
} from "@imggion/html2realpdf";The package is ESM. It ships its TypeScript declarations, Worker module, WebAssembly binary, and PDF preview assets.
Browser requirements
Rendering uses browser APIs. The default renderer needs these features:
- DOM APIs
- WebAssembly
- Web Workers
Bloband object URLs
The package can be imported while a framework renders on the server. Do not call renderPdf or createRenderer on the server.
unsupported
Node.js rendering is not part of the public API. Use a browser surface for the render call.
Next step
Continue with the quick start, or open the Next.js guide for a client component example.