Stirling PDF icon

Stirling PDF

Merged API: Stirling PDF - Processing API + Stirling PDF - Management API + Stirling PDF - System API

Actions260

Security → Add Password

AI-generated

Summary

Add password protection to a PDF file, optionally setting owner and user passwords along with various permission restrictions and encryption key length.

Inputs

  • fileInputBinaryProperty — Name of the binary property containing the PDF file data for processing in binary form.
  • fileId — File ID referencing an existing server-side PDF file to which the password will be added.
  • ownerPassword — Owner password restricting actions that can be performed on the PDF once opened.
  • password — User password required to open the PDF document.
  • keyLength (required) — Length of the encryption key (40, 128, or 256 bits).
  • preventAssembly — Whether to prevent document assembly.
  • preventExtractContent — Whether to prevent content extraction.
  • preventExtractForAccessibility — Whether to prevent content extraction for accessibility purposes.
  • preventFillInForm — Whether to prevent filling in forms within the PDF.
  • preventModify — Whether to prevent modification of the document.
  • preventModifyAnnotations — Whether to prevent modification of annotations.
  • preventPrinting — Whether to prevent printing the document.
  • preventPrintingFaithful — Whether to prevent faithful printing (high quality printing).

Output shape

binary file representing the password-protected PDF

Supports either providing the PDF as binary data via the specified binary property or referencing a server-side file ID. The output is the modified PDF file with added password security and restrictions. Optional request settings can control batching, SSL handling, proxy, and timeout.

Links

Discussion