Skip to main content
Stage types are listed in Reference — stages, and the PDF request and result types in Reference — PDF.
PathLikeOrReadStream, PaperSize, RequestInputOptions, DownloadFrom, DownloadFromEntry, WebhookOptions and OutputOptions are exported from chromiumly. The other shapes on this page, such as PageProperties, ImageProperties and Cookie, describe options you pass inline: they aren’t exported as named types.

PathLikeOrReadStream

A path (string, Buffer or URL) or a ReadStream (from fs). Where a method uploads file content, a Buffer is the content itself.

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)

RequestInputOptions

Every route takes these besides its own files. See Files and downloads.

WebhookOptions

See Webhooks.

OutputOptions

See Request tracing.

Chromium media and console types

  • EmulatedMediaType: 'screen' or 'print'
  • emulatedMediaFeatures: Record<string, string>, such as { "prefers-color-scheme": "dark", "prefers-reduced-motion": "reduce" }
  • ConsoleMessageType: 'log', 'debug', 'info', 'warning', 'error' or 'assert', for failOnConsoleMessageTypes
Conversion options include the shared Chromium options (userAgent, header, footer, wait*, extraHttpHeaders, failOn*, skipNetworkIdleEvent, skipNetworkAlmostIdleEvent, cookies, archives, downloadFrom, webhook) plus properties, nativeBookmarks, nativeTaggedPdf, stages, and outputFilename/trace. See Converters and Chromium options for the full list.

Template types (hosted API)

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