PDFBase loads your HTML into a headless Chromium browser, renders it exactly as Chrome would, and captures the result as a PDF. This means full support for:
/* Force a page break before this element */.new-section { page-break-before: always; }/* Prevent a table from being split across pages */table { page-break-inside: avoid; }/* Keep headings with their content */h2 { page-break-after: avoid; }
Use wait_until: "networkidle" (the default) to ensure all fonts finish loading before capture. If a font takes too long, resource_timeout will skip it and fall back to the next font in the stack.
The URL is loaded in Chromium and rendered identically to how it appears in Chrome. Pass a wait_for_selector to wait for dynamic content to finish loading.