The TypeScript package root is the only public entry point.
import html2pdf, {
createRenderer,
renderPdf,
type RenderOptions,
} from "@imggion/html2realpdf";The generated reference follows bindings/js/src/index.ts and the package export map. It excludes raw Worker, snapshot, page normalization, and WebAssembly bridge modules that are not exported to package users.
Primary functions
renderPdfrenders through the package default Worker renderer.createRenderercreates an owned renderer.html2pdfcreates the compatibility chain.
Result handles
PdfDocumentowns PDF bytes, object URLs, and previews.PdfPreviewcontrols the in-page canvas viewer.Html2RealPdfis the reusable renderer returned bycreateRenderer.
Configuration
RenderOptionscontrols one render.RendererInitcontrols renderer lifetime resources.PageOptionsdefines explicit page geometry.PdfPreviewOptionsconfigures the in-page viewer.Html2PdfOptionscontains the supported compatibility subset.
Errors
All public wrapper errors extend Html2RealPdfError. Its code value is stable for control flow and telemetry.
Open the generated API index for every function, interface, type alias, and class.