new and expose a single async method: convert(options) → Promise<Buffer>.
UrlConverter
HtmlConverter
MarkdownConverter
Shared conversion options
See Types for full definitions. Summary:- properties —
PageProperties(size, margins, landscape, singlePage,nativePageRanges, etc. — each independently optional) - header, footer — path, Buffer, or ReadStream
- userAgent — override the
User-Agentheader 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; usepdfaon PDFEngines.convert instead- metadata, cookies, downloadFrom, webhook, outputFilename, trace
- split —
ConvertSplit(mode, span, unify — noflatten, 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
- facturx —
FacturXOptions, see Factur-X - watermark, stamp —
PdfEngineWatermarkandPdfEngineStamp(PDF-engine post-processing) - rotate —
PdfEngineRotate(PDF-engine page rotation after conversion)
PathLikeOrReadStream = string (path) | Buffer | ReadStream.