# Documentation
- Getting Started
- [html2realpdf documentation](/docs)
- [Installation](/docs/getting-started/installation): Install the ESM package and import its public browser API.
- [Quick Start](/docs/getting-started/quick-start): Render a mounted HTML element and download the PDF.
- [Next.js](/docs/getting-started/nextjs): Call html2realpdf from a client component after its ref is mounted.
- Guides
- [Basic Browser Usage](/docs/guides/basic-usage): Choose an input form, render a document, and manage its lifetime.
- [Configuration](/docs/guides/configuration): Configure page geometry, CSS handling, resources, metadata, and rendering behavior.
- [Fonts](/docs/guides/fonts): Register reusable TrueType fonts on an explicit renderer.
- [Pagination](/docs/guides/pagination): Combine page geometry, authored CSS breaks, and narrow selector rules.
- [Images and Resources](/docs/guides/images): Resolve image and stylesheet resources before the WebAssembly render.
- [Links](/docs/guides/links): Preserve supported browser links as PDF annotations.
- [PDF Preview](/docs/guides/preview): Render the generated PDF into an in-page canvas viewer.
- [Troubleshooting](/docs/guides/troubleshooting): Diagnose environment, source, resource, CSS, and WebAssembly failures.
- [Known Limitations](/docs/guides/limitations): Understand the current browser, CSS, accessibility, and compatibility boundaries.
- Examples
- [Browser Element](/docs/examples/browser-element): Render a mounted invoice with print styles and PDF metadata.
- [Reusable Renderer](/docs/examples/reusable-renderer): Reuse one renderer and registered font across several documents.
- [React Ref](/docs/examples/react-ref): Render live React state through a mounted ref without a React wrapper package.
- API Reference
- [API Reference](/docs/api-reference): Public exports available from the @imggion/html2realpdf package root.
- Generated API
- [Generated API](/docs/api-reference/generated): Public root exports generated from the TypeScript package source.
- Functions
- [Functions](/docs/api-reference/generated/functions): Generated functions exported from the public package root.
- [createRenderer](/docs/api-reference/generated/functions/create-renderer): Creates a reusable renderer with explicit backend and font ownership.
- [html2pdf](/docs/api-reference/generated/functions/html2pdf): Creates an html2pdf.js-compatible PDF chain.
- [renderPdf](/docs/api-reference/generated/functions/render-pdf): Renders with a lazily created package-default Worker renderer.
- Classes
- [Classes](/docs/api-reference/generated/classes): Generated classes exported from the public package root.
- [CanvasToSvgError](/docs/api-reference/generated/classes/canvas-to-svg-error): A canvas-to-SVG adapter threw or returned an invalid result.
- [CompatWorker](/docs/api-reference/generated/classes/compat-worker): Stateful, Promise-like compatibility chain.
- [Html2RealPdf](/docs/api-reference/generated/classes/html2-real-pdf): Reusable renderer backed by one Worker or main-thread WASM context.
- [Html2RealPdfError](/docs/api-reference/generated/classes/html2-real-pdf-error): Base error carrying a machine-readable wrapper error code.
- [InvalidSourceError](/docs/api-reference/generated/classes/invalid-source-error): The source is not a string, mounted element, or non-null ref-like object.
- [PdfDocument](/docs/api-reference/generated/classes/pdf-document): Successful PDF output returned by the renderer.
- [PdfPreview](/docs/api-reference/generated/classes/pdf-preview): Interactive canvas preview created and owned by a `PdfDocument`.
- [ResourceLoadError](/docs/api-reference/generated/classes/resource-load-error): An image, stylesheet, canvas, or SVG resource could not be materialized.
- [UnsupportedCompatibilityFeatureError](/docs/api-reference/generated/classes/unsupported-compatibility-feature-error): A requested html2pdf.js stage belongs to its unsupported raster pipeline.
- [UnsupportedCssError](/docs/api-reference/generated/classes/unsupported-css-error): Authored CSS or SVG cannot satisfy the selected strictness policy.
- [UnsupportedEnvironmentError](/docs/api-reference/generated/classes/unsupported-environment-error): Rendering was requested where browser DOM APIs are unavailable.
- [WasmRenderError](/docs/api-reference/generated/classes/wasm-render-error): The WASM bridge or native renderer failed.
- Interfaces
- [Interfaces](/docs/api-reference/generated/interfaces): Generated interfaces exported from the public package root.
- [CanvasToSvgRequest](/docs/api-reference/generated/interfaces/canvas-to-svg-request): Context passed to a canvas-to-SVG adapter.
- [CompatJsPdfOptions](/docs/api-reference/generated/interfaces/compat-js-pdf-options): Page settings accepted through the html2pdf.js-compatible `jsPDF` option.
- [CompatPageBreakOptions](/docs/api-reference/generated/interfaces/compat-page-break-options): Page-break settings accepted by the html2pdf.js compatibility layer.
- [Diagnostic](/docs/api-reference/generated/interfaces/diagnostic): Structured warning or error produced without losing successful PDF output.
- [FontRegistration](/docs/api-reference/generated/interfaces/font-registration): Embeddable TrueType font registered in a renderer-owned WASM context.
- [Html2PdfOptions](/docs/api-reference/generated/interfaces/html2-pdf-options): Options supported by the PDF-oriented html2pdf.js compatibility layer.
- [PageBreakRules](/docs/api-reference/generated/interfaces/page-break-rules): Selector-driven pagination overrides compatible with html2pdf.js workflows.
- [PageOptions](/docs/api-reference/generated/interfaces/page-options): Explicit page geometry. Supplying this overrides captured `@page` geometry.
- [PdfMetadata](/docs/api-reference/generated/interfaces/pdf-metadata): PDF information dictionary fields written by the native renderer.
- [PdfPreviewOptions](/docs/api-reference/generated/interfaces/pdf-preview-options): Display and rendering limits for `PdfDocument.preview`.
- [RendererInit](/docs/api-reference/generated/interfaces/renderer-init): Configuration whose lifetime matches an explicit renderer instance.
- [RenderOptions](/docs/api-reference/generated/interfaces/render-options): Options applied to one HTML snapshot and PDF render.
- [RenderProgress](/docs/api-reference/generated/interfaces/render-progress): Progress notification for a rendering phase.
- [ResourceRequest](/docs/api-reference/generated/interfaces/resource-request): Resource requested while materializing a self-contained snapshot.
- [ViewportOptions](/docs/api-reference/generated/interfaces/viewport-options): Deterministic viewport used for responsive layout and media queries.
- Type Aliases
- [Type Aliases](/docs/api-reference/generated/type-aliases): Generated type aliases exported from the public package root.
- [CanvasFallbackPolicy](/docs/api-reference/generated/type-aliases/canvas-fallback-policy): Policy used when a canvas-to-SVG adapter intentionally returns `null`.
- [CanvasSvgSource](/docs/api-reference/generated/type-aliases/canvas-svg-source): Complete SVG returned by a canvas adapter.
- [CanvasToSvg](/docs/api-reference/generated/type-aliases/canvas-to-svg): Replaces a live canvas with vector SVG when the source library can export it.
- [CssProfile](/docs/api-reference/generated/type-aliases/css-profile): Layout and CSS support profile.
- [FallbackPolicy](/docs/api-reference/generated/type-aliases/fallback-policy): Policy for SVG subtrees that cannot remain native PDF vectors.
- [HtmlSource](/docs/api-reference/generated/type-aliases/html-source): Input accepted by the snapshot boundary.
- [LayoutContext](/docs/api-reference/generated/type-aliases/layout-context): Containing block used for the snapshotted root element.
- [LengthUnit](/docs/api-reference/generated/type-aliases/length-unit): Units used for custom page dimensions and margins.
- [Margin](/docs/api-reference/generated/type-aliases/margin): Page margins in the selected page unit.
- [MediaType](/docs/api-reference/generated/type-aliases/media-type): Media environment used while resolving styles and media queries.
- [PageFormat](/docs/api-reference/generated/type-aliases/page-format): Named physical page sizes or a custom `[width, height]` in the selected unit.
- [PageOrientation](/docs/api-reference/generated/type-aliases/page-orientation): Orientation applied after resolving the page format.
- [PdfOutputType](/docs/api-reference/generated/type-aliases/pdf-output-type): Output encodings supported by compatibility `output` methods.
- [PdfPreviewTheme](/docs/api-reference/generated/type-aliases/pdf-preview-theme): Color theme used by the integrated PDF preview controls.
- [RefLike](/docs/api-reference/generated/type-aliases/ref-like): A structural ref accepted without making React a runtime dependency.
- [RenderPhase](/docs/api-reference/generated/type-aliases/render-phase): Coarse rendering phases reported at stable cancellation boundaries.
- [ResourceResolver](/docs/api-reference/generated/type-aliases/resource-resolver): Resolves resources that cannot be fetched directly by the browser snapshot.
- [UnsupportedCssPolicy](/docs/api-reference/generated/type-aliases/unsupported-css-policy): Action taken when an authored CSS property is outside the selected profile.
- Architecture
- [Rendering Pipeline](/docs/architecture/rendering-pipeline): Follow browser input through snapshot, layout, pagination, paint, and PDF output.
- [WebAssembly Boundary](/docs/architecture/wasm-boundary): Understand the high-level TypeScript contract around the internal WebAssembly bridge.
- Migration
- [From html2pdf.js](/docs/migration/from-html2pdf-js): Move supported PDF-oriented chains to the html2realpdf compatibility export.
- **RESOURCES**
- [PDF Playground](/docs/playground): Preview and download real PDF outputs across documents, reports, presentations, and custom page sizes.
- **LLM**
- [LLM index](/docs/llm.txt)