Skip to main content
Chromium converters and LibreOffice 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.
import { UrlConverter } from "chromiumly";

const buffer = await new UrlConverter().convert({
  url: "https://example.com/",
  userPassword: "open_secret",
  ownerPassword: "admin_secret",
});
Same options exist on HtmlConverter, MarkdownConverter, and LibreOffice.convert(). Screenshot routes also accept these parameters where the output is PDF.