Stirling PDF icon

Stirling PDF

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

Actions260

Security → Redact Pdf Manual

AI-generated

Summary

Redact specified areas on selected pages of a PDF file provided either by binary input or a file ID, with options to convert the result to an image and set the redaction color.

Inputs

  • Input Binary Field Name (File Input) — Name of the binary property containing the PDF file data to redact (defaults to 'data').
  • File Id — ID of a previously uploaded server-side PDF file to use instead of binary input for redaction.
  • Page Numbers (required) — Pages to redact, supporting ranges (e.g., '1,3,5-9'), 'all', or functions like '2n+1'.
  • Redactions (required) — List of areas on the pages to redact.
  • Convert P D F To Image (required) — Boolean flag to convert the redacted PDF output to an image format.
  • Page Redaction Color (required) — Hex color code used to fill fully redacted pages.

Output shape

a binary file containing the redacted PDF, or an image if conversion is enabled

The output file will reflect the redactions applied according to the input parameters; conversion to image is controlled via the 'Convert P D F To Image' option.

Examples

Example 1: Redact sensitive areas on pages 1 through 3 of an uploaded PDF binary input, output as a PDF with black redaction color.

Set 'Input Binary Field Name' to the binary property holding PDF data, 'Page Numbers' to '1-3', provide 'Redactions' as JSON, 'Convert P D F To Image' to false, and 'Page Redaction Color' to '#000000'.

Links

Discussion