Skip to main content
All three classes are instantiated with new and expose a single async method: convert(options)Promise<Buffer>.

UrlConverter

HtmlConverter

MarkdownConverter

Shared conversion options

See Types for full definitions. Summary:
  • propertiesPageProperties (size, margins, landscape, singlePage, nativePageRanges, etc. — each independently optional)
  • header, footer — path, Buffer, or ReadStream
  • userAgent — override the User-Agent header sent by Chromium
  • waitDelay, waitForSelector, waitForExpression
  • extraHttpHeaders, failOnHttpStatusCodes, failOnConsoleExceptions, failOnResourceHttpStatusCodes, ignoreResourceHttpStatusDomains, failOnResourceLoadingFailed, skipNetworkIdleEvent, skipNetworkAlmostIdleEvent
  • pdfUA, generateTaggedPdf (PDF/UA structure tags, independent of pdfUA), generateDocumentOutline
  • pdfFormat — deprecated, no longer supported by Chromium since Gotenberg 8.0.0; use pdfa on PDFEngines.convert instead
  • metadata, cookies, downloadFrom, webhook, outputFilename, trace
  • splitConvertSplit (mode, span, unify — no flatten, see Types)
  • flatten — flatten the resulting PDF’s form fields and annotations
  • userPassword, ownerPassword, and the six permission booleans (allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling)
  • embeds, embedsMetadata — see Embedding files
  • facturxFacturXOptions, see Factur-X
  • watermark, stampPdfEngineWatermark and PdfEngineStamp (PDF-engine post-processing)
  • rotatePdfEngineRotate (PDF-engine page rotation after conversion)
PathLikeOrReadStream = string (path) | Buffer | ReadStream.