The 'Redact PDF' flow action provides the capability to search for text fragments within PDF documents, automatically apply a specified redaction and remove the associated text from the PDF documents text later.
Whilst this action is limited to extracting text regions from PDF documents, simply convert files to PDF format using the 'Convert to PDF' flow action prior to executing this action.
Please refer to the Supported Document Types articles for a complete list of the different file formats/document types which are supported for PDF conversion.
The default 'Redact PDF' flow action parameters are detailed below:
- Filename: The PDF filename (including the file extension)
- File Content: A Base64 encoded representation of the PDF file to be processed.
- Redactions: An array of redactions (See below for further details)
For each redaction; either a text value or regular expression should be provided whereby the text contained within the PDF document which meets the search criteria will be redacted using the HTML colour specified.
Multiple redaction operations can be executed in a single operation. To create more than one redaction click the 'Add new item' button:
- Text: The text to locate and apply a redaction to.
- Expression: The regular expression to utilise to search for text and apply a redaction to.
- Redaction Colour: The HTML colour to use for the redaction.
- Skip First Page: Set whether to ignore the first page when searching for the fragment to redact
- Apply To: Set which pages within the PDF document to apply redactions to
- Page Numbers: Specify the page numbers to redact, this property only applies when the 'Apply To' property is set to 'Specific'.
- Ignore Page Numbers: Specify the page numbers not to redact, this property only applies when the 'Apply To' property is set to 'Specific'.
We recommend using the https://regexr.com/ site for expression creation and testing.
Please refer to the Obtaining the 'File Contents' Parameter article for guidance on how to obtain the 'File Content' parameter ready to provide to an Encodian flow action.
The advanced 'Redact PDF' flow action parameters are detailed below:
- Operation ID: (Advanced) The ID of a parent operation, please refer to Flow Action Return Options: File Content vs. Operation ID
- Return File: (Advanced) Sets whether to return the file or just an Encodian Operation ID, please refer to: Flow Action Return Options: File Content vs. Operation ID
The 'Redact PDF' flow action returns the following data.
Standard Return Values
- Filename - The filename of the document.
- FileContent - The processed PDF document content.
- OperationId - The unique ID assigned to this operation.
- HttpStatusCode - The HTTP Status code for the response.
- HttpStatusMessage - The HTTP Status message for the response.
- Errors - An array of error messages should an error occur.
- Operation Status - Indicates whether the operation has been completed, has been queued or has failed.