ApplyRedactions

Page manipulation

Requires the Enterprise edition. In Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); the Enterprise DLL and ActiveX builds provide it unchanged. Other editions keep the method, which returns 0, an empty string or False and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)

Description

Executes all pending /Subtype /Redact annotations across every page of the selected document by scrubbing intersecting glyphs, paths, shadings, image XObjects and inline images from page content layers and nested Form XObjects, measuring text glyph by glyph as described for RedactRegion; an annotation with /QuadPoints redacts each quadrilateral rather than its whole /Rect, and other annotations and form field values under the regions are removed, synthesising the final redaction appearance (including /IC and /OverlayText), flattening it into the page content stream, and removing the /Redact annotation

Once a redaction has been applied the document is always saved in full and an incremental save is refused, as described for RedactRegion

Syntax

Delphi

Function TPDFlib.ApplyRedactions: Integer; Virtual;

ActiveX

Function PDFlib::ApplyRedactions() As Long

DLL

int DLApplyRedactions(int InstanceID);

Return values

>= 0The number of /Redact annotations applied and flattened across the document