Skip to main content
Static class. No constructor; call its methods on PDF. Every method resolves to a Promise.

Request options

pipe(options)

Runs stages on the PDFs, in order. At least one stage is required.

Single-stage methods

Each posts to /forms/pdf/<op> and resolves to the result: a PDF, or a ZIP or another file type where the stage makes one. All return Promise<Buffer>. The stages’ options are listed in Reference — stages.

Read methods

They answer one entry per PDF, under its file name, parsed from Gotenberg’s JSON. They take no webhook and no output filename.

generate(filename, buffer)

Writes a buffer to __generated__/<filename> under the current working directory.