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 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.
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
- Final Operation: (Advanced) Sets whether the this is last Encodian flow action, 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 completed, has been queued or has failed.