TPDFlibEntRedact
Editions
Description
TPDFlibEntRedact (unit PDFlibEntRedact) descends from TPDFlibEntCompliance and implements the Enterprise methods for secure redaction, which remove the text, vector graphics and image pixels under redaction areas: RedactRegion handles one rectangle on one page, and ApplyRedactions executes every Redact annotation of the document.
It belongs to the Enterprise edition, which includes every Small Business class as well. TPDFlibEntSignVerify descends from it and adds the next feature group.
Syntax
Delphi
TPDFlibEntRedact = Class(TPDFlibEntCompliance);Key members
| RedactRegion | Removes the content whose painted area intersects the rectangle from the page Page, and removes the annotations other than Redact annotations that meet the rectangle; returns the number of content ranges and annotations removed |
|---|---|
| ApplyRedactions | Collects the area of every Redact annotation on every page, removes the content under these areas and flattens the annotations; returns the number of Redact annotations flattened |
Remarks
Both methods mark the document so that it is saved in full from then on, because cut-out content must not survive in an earlier revision or as an unreferenced object. The content streams of a page are combined into one before anything is removed.
RedactRegion converts the rectangle from the current origin and units into PDF user space, with Top as the upper edge in every origin, and adds a Redact annotation over the region when Options is 0 or 2. An annotation with /QuadPoints contributes its quadrilaterals to ApplyRedactions, one without them its /Rect.
When the page content cannot be read or rewritten, the methods stop and set LastErrorCode to PDFLIB_ERROR_REDACTION_INCOMPLETE.
Applications normally create TPDFlibEnterprise and get the methods of this class through them. The same methods on a plain TPDFlib return 0, an empty string or False and set LastErrorCode to PDFLIB_ERROR_ENTERPRISE_REQUIRED. An Enterprise method called on TPDFlibSmallBusiness is rejected the same way, because that edition does not carry it.
See also
TPDFlibEntCompliance, TPDFlibEntSignVerify, TPDFlibEnterprise, TPDFlibSmallBusiness