Work with the Native PDF engine v2
The new publishing engine Native PDF engine v2, is based on an upgraded PDF generation framework and includes changes to font handling, CSS processing, and rendering behavior.
As a result, PDF output generated using the new publishing engine may differ from output generated using the existing PDF engine (Native PDF engine v1). Differences may be visible in areas such as text layout, spacing, styling, image rendering, and footnote formatting.
For example, the Native PDF engine v2 supports OpenType fonts, whereas the Native PDF engine v1 primarily relies on TrueType fonts. Similar rendering enhancements can affect the overall appearance of generated PDFs.
For details on how to enable the Native PDF engine v2 in your environment, view Configure the new publishing engine for Native PDF.
Recommended CSS updates for the new publishing engine
If you want to restore the appearance of PDF output generated by the Native PDF engine v1 while using the Native PDF engine v2, you may need to update your custom CSS. The recommended CSS changes described below can help maintain output consistency after enabling the new setting.
image-rendering: pixelatedsans-serif font family or fonts that exhibit spacing differences, add:-ro-glyph-layout-mode: quality;.fn::footnote-marker{ content: counter(footnote) " ";vertical-align: super;font-size: 65%;}text-underline-offset property and adjust the offset value as needed. For example:text-decoration: underline;text-underline-offset: -0.1em;.step {margin-top: 0.3rem;margin-bottom: 0.5rem;padding-left: calc(1.5rem + 1ch);}h1.chapter {margin-top: 0;}chaptoc-body { margin-bottom: 0;}::marker {font-family: -ro-symbols !important;}top value to correctly position the marker.position: relative.li {-ro-paint-reordering: avoid;}Workarounds for known issues
The following workarounds can help address known issues in the generated PDF output when using Native PDF engine v2.
-
text-decorationcss properties applied to table content are not rendered in PDF output.Workaround: Apply the text decoration properties to
spanelements within the table content instead of applying them directly to the table elements. -
-ro-colorbar-top-leftand-ro-colorbar-top-rightCSS properties do not affect the color bar in PDF output.Workaround: Remove the corresponding values from the user style sheet in
mergedHTML.json, or add!importantto the property values in the document CSS so they are not overridden by the user style sheet. -
Color bars may appear merged when the page width is constrained because color bars are not scaled down with the page size in PDF output.
Workaround: Display the gray and colored bars on different sides of the page, or adjust the color bar settings so they do not overlap at smaller page widths.
Fixed issues with the new publishing engine
The following issues in PDF output generated using Native PDF Engine v1 are fixed in Native PDF Engine v2:
- When generating Native PDF output for certain content, only the first page is rendered in the PDF despite the intermediate HTML containing the complete content across multiple pages. (GUIDES-28270)
- The reading order of content in Native PDF output with accessibility settings enabled is incorrect. Page numbers from footers are read before the main content instead of at the end. (GUIDES-27790)
- The color bar in Native PDF output does not stretch across the full page width and overlaps when the page size is customized, causing some color boxes to be hidden. (GUIDES-15505)
- The
CSS:is()pseudo-classselector is not honored in Native PDF output, resulting in styling differences compared to browser rendering. (GUIDES-11328)