PdfFormat
PathLikeOrReadStream
string (file path), Buffer, or ReadStream (from fs).
PageProperties (converters)
| Property | Type | Default / notes |
|---|---|---|
| singlePage | boolean | false |
| size | { width, height } (number or string) | width/height in inches (number) or units: pt, px, in, mm, cm, pc |
| margins | object (top, bottom, left, right) | same units as size |
| preferCssPageSize | boolean | false |
| printBackground | boolean | false |
| omitBackground | boolean | false |
| landscape | boolean | false |
| scale | number | 1.0 |
| nativePageRanges | object with from, to (numbers) | — |
ImageProperties (screenshots)
| Property | Type | Notes |
|---|---|---|
| format | 'png' / 'jpeg' / 'webp' | required |
| quality | number | 0–100, JPEG only |
| omitBackground | boolean | — |
| width | number | default 800 |
| height | number | default 600 |
| clip | boolean | default false |
Split
Metadata
DownloadFrom
downloadFrom when Gotenberg should fetch files from remote URLs that return a Content-Disposition filename.
WebhookOptions
webhook to switch a request to async callback mode.
Cookie
EmulatedMediaType / EmulatedMediaFeature
EmulatedMediaType:'screen'or'print'EmulatedMediaFeature: object withnameandvaluestrings (e.g.prefers-color-scheme,prefers-reduced-motion)
skipNetworkIdleEvent, skipNetworkAlmostIdleEvent, cookies, downloadFrom, etc.) plus properties, pdfUA, metadata, split, userPassword, ownerPassword, embeds. See the source or Converters and Chromium options for the full list.
PdfEngineRotate
Used by converterconvert(), LibreOffice.convert(), PDFEngines.merge(), and PDFEngines.split() as optional post-processing. Angles match Gotenberg: 90, 180, or 270 degrees.
PdfEngineWatermark / PdfEngineStamp
Used by converterconvert(), LibreOffice.convert(), PDFEngines.merge(), PDFEngines.split(), and dedicated PDFEngines.watermark() / PDFEngines.stamp().
image/pdf sources, set expression to the uploaded filename and pass the asset in file.
Bookmark
Template types (hosted API)
The hostedTemplates class exports these types:
Templates.generate(request, { validate?: boolean }) uses TemplateRequest<TType> and returns Promise<Buffer>.