Skip to main content
Module

x/gotenberg/mod.ts>ChromiumOptions

A gotenberg client for Deno
Latest
interface ChromiumOptions
import { type ChromiumOptions } from "https://deno.land/x/gotenberg@0.4.0/mod.ts";

Options for Chromium Module

Properties

paperWidth: float

Paper width, in inches (default 8.5)

paperHeight: float

Paper height, in inches (default 11)

marginTop: float

Top margin, in inches (default 0.39)

marginBottom: float

Bottom margin, in inches (default 0.39)

marginLeft: float

Left margin, in inches (default 0.39)

marginRight: float

Right margin, in inches (default 0.39)

preferCssPageSize: bool

Define whether to prefer page size as defined by CSS (default false)

printBackground: bool

Print the background graphics (default false)

landscape: bool

Set the paper orientation to landscape (default false)

scale: float

The scale of the page rendering (default 1.0)

nativePageRanges: string

Page ranges to print, e.g., '1-5, 8, 11-13' - empty means all pages

waitDelay: duration

Duration to wait when loading an HTML document before converting it to PDF

waitForExpression: string

The JavaScript expression to wait before converting an HTML document to PDF until it returns true

userAgent: string

Override the default User-Agent header

extraHttpHeaders: string

HTTP headers to send by Chromium while loading the HTML document (JSON format)

failOnConsoleExceptions: bool

Return a 409 Conflict response if there are exceptions in the Chromium console (default false)

emulatedMediaType: string

The media type to emulate, either "screen" or "print" - empty means "print"

pdfFormat: string

The PDF format of the resulting PDF