Skip to main content

Render

render draws pages as images. PDF.render() returns the images alone: one image, or a ZIP of several (report_1.png, …). As the last stage of a list, render returns them in a ZIP next to the PDF.
To capture a web page as an image directly, use the Chromium screenshots instead.

Extract text

extract-text returns the text the pages show, as a .txt file whose pages are separated by a form feed. PDF.extractText() returns the text alone; as the last stage of a list, it comes back in a ZIP next to the PDF.
Gotenberg recognizes no text in an image: a scan without a text layer extracts nothing.

Optimize

optimize rewrites the PDF to shrink it. Every option is on unless you turn it off, and it keeps the quality of every image.
A signed PDF is refused, and so is an encrypted one unless the stages decrypt or encrypt it. To lower image quality, do it where the PDF is made: LibreOffice’s nativeQuality and nativeReduceImageResolution, or smaller images in the HTML you send Chromium. See Reference — PDF.