Skip to content

Commit ac8ce1c

Browse files
Merge pull request #1838 from syncfusion-content/993766-RedactionPdfViewer
993766: Redaction Annotation UG for PDF Viewer
2 parents 801c840 + 3993e5b commit ac8ce1c

File tree

187 files changed

+6859
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+6859
-0
lines changed

Document-Processing-toc.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@
175175
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/annotation/annotations-in-mobile-view">Annotations in Mobile view</a></li>
176176
</ul>
177177
</li>
178+
<li>Redaction
179+
<ul>
180+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/overview">Text Markup Annotation</a></li>
181+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/programmatic-support">Programmatic Support</a></li>
182+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/ui-interaction">UI Interactions</a></li>
183+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/toolbar">Toolbar</a></li>
184+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/mobile-view">Mobile View</a></li>
185+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/search-redact">Search Text and Redact</a></li>
186+
</ul>
187+
</li>
178188
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/interaction-mode">Interaction Mode</a></li>
179189
<li>Form Designer
180190
<ul>
@@ -339,6 +349,16 @@
339349
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/annotation/annotations-in-mobile-view">Annotations in Mobile view</a></li>
340350
</ul>
341351
</li>
352+
<li>Redaction
353+
<ul>
354+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/overview">Overview</a></li>
355+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/ui-interaction">UI Interactions</a></li>
356+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/programmatic-support">Programmatic Support</a></li>
357+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/toolbar">Toolbar</a></li>
358+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/mobile-view">Mobile View</a></li>
359+
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/Redaction/search-redact">Search Text and Redact</a></li>
360+
</ul>
361+
</li>
342362
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-mvc/interaction-mode">Interaction Mode</a></li>
343363
<li>Form Designer
344364
<ul>
@@ -513,6 +533,16 @@
513533
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotations-in-mobile-view">Annotations in Mobile view</a></li>
514534
</ul>
515535
</li>
536+
<li>Redaction
537+
<ul>
538+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/overview">Overview</a></li>
539+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/programmatic-support">Programmatic Support</a></li>
540+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/ui-interaction">UI Interactions</a></li>
541+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/toolbar">Toolbar</a></li>
542+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/mobile-view">Mobile View</a></li>
543+
<li><a href="/document-processing/pdf/pdf-viewer/angular/Redaction/search-redact">Search Text and Redact</a></li>
544+
</ul>
545+
</li>
516546
<li><a href="/document-processing/pdf/pdf-viewer/angular/interaction-mode">Interaction Mode</a></li>
517547
<li>Form Designer
518548
<ul>
@@ -837,6 +867,16 @@
837867
<li><a href="/document-processing/pdf/pdf-viewer/react/annotation/annotations-in-mobile-view">Annotations in Mobile view</a></li>
838868
</ul>
839869
</li>
870+
<li>Redaction
871+
<ul>
872+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/overview"></a>Overview</li>
873+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/programmatic-support">Programmatic Support</a></li>
874+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/ui-interaction">UI Interactions</a></li>
875+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/toolbar">Toolbar</a></li>
876+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/mobile-view">Mobile View</a></li>
877+
<li><a href="/document-processing/pdf/pdf-viewer/react/Redaction/search-redact">Search Text and Redact</a></li>
878+
</ul>
879+
</li>
840880
<li><a href="/document-processing/pdf/pdf-viewer/react/interaction-mode">Interaction Mode</a></li>
841881
<li>Form Designer
842882
<ul>
@@ -997,6 +1037,16 @@
9971037
<li><a href="/document-processing/pdf/pdf-viewer/vue/annotation/comments">Comments</a></li>
9981038
</ul>
9991039
</li>
1040+
<li>Redaction
1041+
<ul>
1042+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/overview">Overview</a></li>
1043+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/programmatic-support">Programmatic Support</a></li>
1044+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/ui-interaction">UI Interactions</a></li>
1045+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/toolbar">Toolbar</a></li>
1046+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/mobile-view">Mobile View</a></li>
1047+
<li><a href="/document-processing/pdf/pdf-viewer/vue/Redaction/search-redact">Search Text and Redact</a></li>
1048+
</ul>
1049+
</li>
10001050
<li><a href="/document-processing/pdf/pdf-viewer/vue/interaction-mode">Interaction Mode</a></li>
10011051
<li>Form Designer
10021052
<ul>
@@ -1160,6 +1210,16 @@
11601210
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/annotations/annotation-event">Annotations Events</a></li>
11611211
</ul>
11621212
</li>
1213+
<li>Redaction
1214+
<ul>
1215+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/overview">Overview</a></li>
1216+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/programmatic-support">Programmatci Support</a></li>
1217+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/ui-interaction">UI-Interaction</a></li>
1218+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/toolbar">Toolbar</a></li>
1219+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/mobile-view">Mobile View</a></li>
1220+
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/Redaction/search-redact">Search Text and Redact</a></li>
1221+
</ul>
1222+
</li>
11631223
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interaction-mode">Interaction Mode</a></li>
11641224
<li>Form Designer
11651225
<ul>
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
---
2+
layout: post
3+
title: Redaction in mobile view in Angular PDF Viewer | Syncfusion
4+
description: Learn how to apply redactions in mobile view using the Syncfusion Angular PDF Viewer with a complete toolbar setup and redaction workflow.
5+
platform: document-processing
6+
control: PdfViewer
7+
documentation: ug
8+
---
9+
10+
# Redaction in Mobile View in Angular PdfViewer Component
11+
12+
The Redaction Tool enables users to permanently mark and remove sensitive content from PDF documents in mobile view using the Angular PdfViewer component. This feature is optimized for touch interactions and provides a streamlined redaction workflow specifically designed for mobile devices.
13+
14+
![Redaction in Mobile View](./redaction-annotations-images/redaction-mobile-view.png)
15+
16+
N> In mobile view, the redaction toolbar appears at the bottom of the viewer for easy thumb access. Mobile layout activates automatically on small screens.
17+
18+
## Adding Redaction in Mobile View
19+
20+
To enable redaction functionality in your Angular application, configure the PDF Viewer with the following setup:
21+
22+
{% tabs %}
23+
{% highlight ts tabtitle="Standalone" %}
24+
25+
import { Component, ViewChild } from '@angular/core';
26+
import {
27+
PdfViewerComponent,
28+
ToolbarSettingsModel,
29+
LinkAnnotationService,
30+
BookmarkViewService,
31+
MagnificationService,
32+
ThumbnailViewService,
33+
ToolbarService,
34+
NavigationService,
35+
AnnotationService,
36+
TextSearchService,
37+
TextSelectionService,
38+
PrintService,
39+
FormFieldsService,
40+
FormDesignerService,
41+
PageOrganizerService
42+
} from '@syncfusion/ej2-angular-pdfviewer';
43+
44+
@Component({
45+
selector: 'app-root',
46+
template: `
47+
<div class="content-wrapper">
48+
<ejs-pdfviewer
49+
#pdfviewer
50+
id="pdfViewer"
51+
[resourceUrl]="resourceUrl"
52+
[documentPath]="documentPath"
53+
[toolbarSettings]="toolbarSettings"
54+
style="height:640px;display:block">
55+
</ejs-pdfviewer>
56+
</div>
57+
`,
58+
providers: [
59+
LinkAnnotationService,
60+
BookmarkViewService,
61+
MagnificationService,
62+
ThumbnailViewService,
63+
ToolbarService,
64+
NavigationService,
65+
AnnotationService,
66+
TextSearchService,
67+
TextSelectionService,
68+
PrintService,
69+
FormFieldsService,
70+
FormDesignerService,
71+
PageOrganizerService
72+
]
73+
})
74+
export class AppComponent {
75+
@ViewChild('pdfviewer', { static: true }) pdfViewer!: PdfViewerComponent;
76+
77+
// Standalone mode (CDN) – keep this version aligned with your package
78+
public resourceUrl = 'https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib';
79+
public documentPath = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';
80+
81+
// Matches your JS toolbar configuration, with RedactionEditTool included
82+
public toolbarSettings: ToolbarSettingsModel = {
83+
toolbarItems: [
84+
'OpenOption',
85+
'UndoRedoTool',
86+
'PageNavigationTool',
87+
'MagnificationTool',
88+
'PanTool',
89+
'SelectionTool',
90+
'CommentTool',
91+
'SubmitForm',
92+
'AnnotationEditTool',
93+
'RedactionEditTool', // Redaction entry in the primary toolbar
94+
'FormDesignerEditTool',
95+
'SearchOption',
96+
'PrintOption',
97+
'DownloadOption'
98+
]
99+
};
100+
}
101+
102+
{% endhighlight %}
103+
{% endtabs %}
104+
105+
## Understanding Mobile Redaction Toolbar Tools
106+
107+
When you enter redaction mode in mobile view, a specialized redaction toolbar appears with multiple tools optimized for touch interaction. Each tool serves a specific purpose in the redaction workflow.
108+
109+
### Redaction Annotation Tool
110+
111+
The Redaction Annotation tool is the primary redaction feature that allows you to draw redaction rectangles on specific content:
112+
113+
Function: Creates visual redaction annotations that mark content for permanent removal
114+
Usage:
115+
Touch and drag to draw rectangular redaction overlays on any content area.
116+
117+
Process:
118+
- Selected content appears with a customizable overlay (default black)
119+
- Annotations remain editable until explicitly applied
120+
- Can be repositioned or deleted before final application
121+
122+
![Redaction Annotation Tool](./redaction-annotations-images/redaction-annotation-annot.png)
123+
124+
### Page Redaction Tool
125+
126+
The Page Redaction tool enables batch redaction of entire pages based on specific patterns.
127+
128+
![Page Redaction Tool](./redaction-annotations-images/page-redaction-annot.png)
129+
130+
Function: Redacts complete pages or page ranges with a single action
131+
Options Available:
132+
- Odd Pages: Redacts only odd-numbered pages (1, 3, 5, etc.)
133+
- Even Pages: Redacts only even-numbered pages (2, 4, 6, etc.)
134+
- Specific Page: Specify single pages, ranges (e.g., 1-5, 10-15), or comma-separated lists (e.g., 1,3,5-7)
135+
- Current Page: Redacts only the currently displayed page
136+
137+
Usage:
138+
Select desired pattern → Review affected pages in the viewer → Confirm redaction scope
139+
140+
![Page Redaction Tool Dialog](./redaction-annotations-images/page-redaction-dialog-annot.png)
141+
142+
### Redaction Properties Tool
143+
144+
The Redaction Properties tool allows customization of redaction appearance before application.
145+
146+
![Redaction Properties Mobile View](./redaction-annotations-images/redaction-properties-annot.png)
147+
148+
Function: Customize the visual appearance of redaction overlays and text replacement
149+
Customizable Properties:
150+
- Fill Color: Change the redaction overlay color (default: black)
151+
- Outline Color: Set outline color for redaction boxes (optional)
152+
- Overlay Text: Add custom text to appear on redacted areas (e.g., "REDACTED", "CONFIDENTIAL")
153+
- Text Color: Change overlay text color for better visibility
154+
- Text Font: Select font family for overlay text
155+
- Text Alignment: Position overlay text within redaction boxes
156+
- Text Size: Adjust overlay text size relative to redaction area
157+
158+
![Redaction Properties Dialog Mobile View](./redaction-annotations-images/redaction-properties-dialog-annot.png)
159+
160+
## Enabling Redaction Mode in Mobile View
161+
162+
Step 1: Tap the Redaction button in the mobile toolbar to activate redaction mode. The redaction toolbar will appear at the bottom of the viewer.
163+
164+
![Redaction toolbar displayed at bottom of mobile PDF viewer with three distinct tools](./redaction-annotations-images/redaction-mobile-view.png)
165+
166+
Step 2: From the redaction toolbar, select your desired redaction tool:
167+
- First Tool (Redaction Annotation): For selective content redaction
168+
- Second Tool (Page Redaction): For page-wide or pattern-based redaction
169+
- Third Tool (Redaction Properties): For appearance customization
170+
171+
Step 3: Configure your redaction parameters using the selected tool interface.
172+
173+
## Applying Different Redaction Types in Mobile View
174+
175+
### Selective Content Redaction
176+
1. Select Redaction Annotation tool (first button)
177+
2. Choose Content: Tap and drag over text or draw rectangular areas
178+
3. Preview: Check redaction overlays for accuracy
179+
4. Apply: Tap "Apply Redactions" button
180+
181+
### Page-Wide Redaction
182+
1. Select Page Redaction tool (second button)
183+
2. Choose Pattern: Select odd pages, even pages, or custom range
184+
3. Review: Verify affected pages in the viewer
185+
4. Apply: Confirm page redaction scope and apply
186+
187+
### Custom Appearance Redaction
188+
1. Select Redaction Properties tool (third button)
189+
2. Customize: Adjust colors, overlay text, and formatting
190+
3. Preview: See changes applied to existing annotations
191+
4. Apply: Use customized appearance for final redaction
192+
193+
## Applying Redactions in Mobile View
194+
195+
N> Applying redactions is permanent. After applying, the underlying content and text are removed from the document and cannot be recovered.
196+
197+
Once you have configured redactions using any combination of tools.
198+
199+
Step 1: Review all redaction marks and configurations.
200+
201+
![Review Redaction Annotation](./redaction-annotations-images/review-redaction-annotation-mv-annot.png)
202+
203+
Step 2: Tap the Apply Redactions button in the redaction toolbar
204+
205+
![Apply Redaction Button](./redaction-annotations-images/apply-redaction-button-mv.png)
206+
207+
Step 3: Confirm the action when prompted - this operation is permanent and cannot be undone
208+
209+
![Apply Redaction Dialog](./redaction-annotations-images/apply-redaction-dialog-mv-annot.png)
210+
211+
The selected content will be permanently removed and replaced according to your redaction properties (solid color blocks or custom overlay text).
212+
213+
![Applied Redaction](./redaction-annotations-images/applied-redaction-annot.png)
214+
215+
## Removing Redaction Annotations
216+
217+
To remove existing redaction annotations before they are applied:
218+
219+
- Step 1: Tap the Redaction Edit button in the mobile toolbar to enter annotation editing mode
220+
- Step 2: Tap on any existing redaction annotation you wish to remove
221+
- Step 3: Select Delete from the context menu that appears
222+
223+
Alternative: Tap redaction annotation → Use delete button in annotation properties panel
224+
225+
![Delete Redaction Annotation](./redaction-annotations-images/delete-redaction-annotation-annot.png)
226+
227+
N> Once redactions have been applied to the document, they become part of the PDF content and cannot be removed or modified.
228+
229+
## See Also
230+
231+
* [Redaction Overview](./overview)
232+
* [UI Interaction](./ui-interaction)
233+
* [Programmatic Support in Redaction](./programmatic-support)
234+
* [Toolbar](./toolbar)
235+
* [Search Text and Redact](./search-redact)

0 commit comments

Comments
 (0)