pub struct PageViewOptions<'a> {
pub paged_js_source: &'a str,
pub paper: &'a str,
pub orientation: &'a str,
pub margin_mm: u8,
pub show_page_numbers: bool,
pub wheel_js: &'a str,
pub columns_per_row: u8,
pub for_export: bool,
pub title: &'a str,
pub standalone_export: bool,
}Expand description
Options for CSS paged media rendering via paged.js.
Pass this to wrap_preview_html_document_paged to control page layout.
Fields§
§paged_js_source: &'a strThe full source of the paged.js polyfill (usually pagedjs::PAGED_POLYFILL_JS).
paper: &'a strCSS paper size: "A4", "Letter", "A3", "A5", "Legal", "B5".
orientation: &'a strPage orientation: "portrait" or "landscape".
margin_mm: u8Page margin in millimetres.
show_page_numbers: boolWhether to inject a @page counter rule so page numbers appear in the margin.
wheel_js: &'a str<script> blocks for wheel scaling and scroll-position reporting (bidirectional scroll sync).
Pass the combined wheel_js + SCROLL_REPORT_JS string, or "" to disable.
columns_per_row: u8Number of page columns to show side-by-side (1-4). Values outside this range are clamped.
for_export: boolWhen true, inject a @media print CSS block that removes paged.js visual
decorations (shadows, gaps, desk background) so pages export cleanly to PDF.
Set to false for normal preview rendering.
title: &'a strDocument title for the HTML <title> tag. Pass "" to omit the tag.
Used for standalone HTML file exports; leave as "" for live preview.
standalone_export: boolWhen true, the WebView integration JS (scroll-sync signals and page-ready
title hooks) is replaced with a minimal opacity-restore callback.
Set to true when producing a standalone HTML file; leave false
for live preview in the editor WebView.