Skip to main content

PdfFormat

PathLikeOrReadStream

string (file path), Buffer, or ReadStream (from fs).

PageProperties (converters)

Every field of size and margins defaults independently — set just one dimension or margin and let Gotenberg fill in the rest.

ImageProperties (screenshots)

Split / ConvertSplit

Split is used by the dedicated PDFEngines.split() route, where flatten is part of the split configuration itself:
ConvertSplit (Omit<Split, 'flatten'>) is used by the split option on Chromium converters and LibreOffice.convert(), where flatten is instead a separate top-level option — see Split PDFs.

Metadata

Use standard PDF/XMP keys (e.g. Author, Title, Keywords). See ExifTool PDF/XMP.

DownloadFrom

Use downloadFrom when Gotenberg should fetch files from remote URLs that return a Content-Disposition filename.

WebhookOptions

Use webhook to switch a request to async callback mode. See Request tracing.

OutputOptions

Accepted by every route, including System (trace only, since there’s no resulting file). See Request tracing.

PdfEnginePermissions

Accepted wherever userPassword/ownerPassword are. See PDF permissions.

EmbedsMetadata

Per-attachment metadata, for PDF/A-3 and Factur-X compliance. See Embedding files.

FacturXOptions

See Factur-X / ZUGFeRD.

EmulatedMediaType / EmulatedMediaFeature

  • EmulatedMediaType: 'screen' or 'print'
  • EmulatedMediaFeature: object with name and value strings (e.g. prefers-color-scheme, prefers-reduced-motion)
Conversion options include the shared Chromium options (userAgent, header, footer, wait*, extraHttpHeaders, failOn*, skipNetworkIdleEvent, skipNetworkAlmostIdleEvent, generateDocumentOutline, cookies, downloadFrom, webhook, etc.) plus properties, pdfUA, generateTaggedPdf, metadata, split, flatten, userPassword, ownerPassword, the six permission booleans, embeds, embedsMetadata, facturx, watermark/stamp/rotate, and outputFilename/trace. See Converters and Chromium options for the full list.

PdfEngineRotate

Used by converter convert(), LibreOffice.convert(), PDFEngines.merge(), and PDFEngines.split() as optional post-processing. Angles match Gotenberg: 90, 180, or 270 degrees.

PdfEngineWatermark / PdfEngineStamp

Used by converter convert(), LibreOffice.convert(), PDFEngines.merge(), PDFEngines.split(), and dedicated PDFEngines.watermark() / PDFEngines.stamp().
For image/pdf sources, set expression to the uploaded filename and pass the asset in file.

Bookmark

Template types (hosted API)

The hosted Templates class exports these types:
Templates.generate(request, { validate?: boolean }) uses TemplateRequest<TType> and returns Promise<Buffer>.