Skip to content

fitZoom()

function fitZoom(
doc,
container,
mode,
padding?
): number;

Zoom that makes a page fit a container. padding is the CSS pixel gap kept around the page.

Parameter Type Default value
doc Pick<LayoutDocument, "pageWidth" | "pageHeight"> undefined
container { height: number; width: number; } undefined
container.height number undefined
container.width number undefined
mode "fitWidth" | "fitPage" undefined
padding number FIT_PADDING

number