Skip to main content
Chromium converters, LibreOffice, and PDFEngines.merge()/PDFEngines.split() support PDF encryption via userPassword and ownerPassword:
  • userPassword — Required to open the PDF.
  • ownerPassword — Grants full access (e.g. printing, copying). If only userPassword is set, the document can still be opened with that password.
Same options exist on HtmlConverter, MarkdownConverter, LibreOffice.convert(), PDFEngines.merge(), and PDFEngines.split().
Screenshot routes (UrlScreenshot, HtmlScreenshot, MarkdownScreenshot) produce an image, not a PDF, and don’t accept userPassword/ownerPassword at all.
Each route above also accepts six permission booleans (allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling), each defaulting to true. See PDF permissions.

Encrypting existing PDFs

There’s also a dedicated PDFEngines.encrypt() route for encrypting existing PDFs directly, without a conversion. Unlike the routes above, it requires at least one of userPassword or ownerPassword; since Gotenberg 8.34.0, an owner-password-only request produces an owner-only PDF that opens without a password but still enforces permissions.
See Encrypt PDFs for the full dedicated-route reference.