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.
Source links point to the exact submodule commit used to generate this reference. That source can include APIs added after the published npm release; check PDF/A-3 source availability before using the archival and attachment options.
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.PdfAttachmentdescribes a file embedded in one render.
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.