Some test text!
iOS / Guides
There are two options to perform redaction. First is using a UI component that provides tools to select text or create regions interactively. Second is an API guide to programmatically apply redactions.
To redact content from a PDF document.
PTVectorRedaction *vec = [[PTVectorRedaction alloc] init];
[vec add: [[PTRedaction alloc] initWithPage_num: 1 bbox: [[[PTPDFRect alloc] init] Set: 100 y1: 100 x2: 550 y2: 600] negative: NO text: @"Top Secret"]];
[vec add: [[PTRedaction alloc] initWithPage_num: 2 bbox: [[[PTPDFRect alloc] init] Set: 30 y1: 30 x2: 450 y2: 450] negative: YES text: @"Negative Redaction"]];
[vec add: [[PTRedaction alloc] initWithPage_num: 2 bbox: [[[PTPDFRect alloc] init] Set: 0 y1: 0 x2: 100 y2: 100] negative: NO text: @"Positive"]];
[vec add: [[PTRedaction alloc] initWithPage_num: 2 bbox: [[[PTPDFRect alloc] init] Set: 100 y1: 100 x2: 200 y2: 200] negative: NO text: @"Positive"]];
[vec add: [[PTRedaction alloc] initWithPage_num: 2 bbox: [[[PTPDFRect alloc] init] Set: 300 y1: 300 x2: 400 y2: 400] negative: NO text: @""]];
[vec add: [[PTRedaction alloc] initWithPage_num: 2 bbox: [[[PTPDFRect alloc] init] Set: 500 y1: 500 x2: 600 y2: 600] negative: NO text: @""]];
[vec add: [[PTRedaction alloc] initWithPage_num: 3 bbox: [[[PTPDFRect alloc] init] Set: 0 y1: 0 x2: 700 y2: 20] negative: NO text: @""]];
PTAppearance *app = [[PTAppearance alloc] init];
[app setRedactionOverlay: YES];
[app setBorder: NO];
[app setShowRedactedContentRegions: YES];
PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath: filename];
[PTRedactor Redact: doc red_arr: vec app: app ext_neg_mode: NO page_coord_sys: YES];
PDF redaction
Full code sample which shows how to use pdftron.PDF.Redactor
to remove potentially sensitive content within PDF documents.
Apryse Redactor makes sure that if a portion of an image, text, or vector graphics is contained in a redaction region, that portion of the image or path data is destroyed and is not hidden with clipping or image masks. Apryse SDK API can also be used to review and remove metadata and other content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.
The redaction process in Apryse SDK consists of two steps:
1. Content identification
A user applies redact annotations that specify the pieces or regions of content that should be removed. The content for redaction can be identified either interactively (e.g. using ‘pdftron.PDF.PDFViewCtrl’ as shown in PDFView sample) or programmatically (e.g. using ‘pdftron.PDF.TextSearch’ or ‘pdftron.PDF.TextExtractor’). Up until the next step is performed, the user can see, move and redefine these annotations.
2. Content removal
Using ‘pdftron.PDF.Redactor.Redact()’ the user instructs Apryse SDK to apply the redact regions, after which the content in the area specified by the redact annotations is removed. The redaction function includes number of options to control the style of the redaction overlay (including color, text, font, border, transparency, etc.).
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales