Skip to content

Commit bee3fe2

Browse files
Merge pull request #2220 from syncfusion-content/1009185-react-dev
1009185: Revamped the react pdfviewer documentation section
2 parents 1508067 + f070055 commit bee3fe2

139 files changed

Lines changed: 1313 additions & 1474 deletions

File tree

Some content is hidden

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

Document-Processing/PDF/PDF-Viewer/react/Redaction/mobile-view.md

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ control: PdfViewer
77
documentation: ug
88
---
99

10-
# Redaction in Mobile View in React PdfViewer Component
10+
# Redaction in mobile view in React PdfViewer component
1111

12-
The Redaction Tool enables users to permanently mark and remove sensitive content from PDF documents in mobile view using the React PdfViewer component. This feature is optimized for touch interactions and provides a streamlined redaction workflow specifically designed for mobile devices.
12+
The Redaction tool lets users permanently mark and remove sensitive content from PDF documents in mobile view. It is optimized for touch interactions and provides a streamlined redaction workflow for phones and tablets.
1313

14-
![Redaction in Mobile View](./redaction-annotations-images/redaction-mobile-view.png)
14+
![Redaction toolbar displayed at bottom of mobile PDF viewer](./redaction-annotations-images/redaction-mobile-view.png)
1515

1616
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.
1717

@@ -69,129 +69,129 @@ root.render(<App />);
6969
{% endhighlight %}
7070
{% endtabs %}
7171

72-
## Understanding Mobile Redaction Toolbar Tools
72+
## Understanding mobile redaction toolbar tools
7373

74-
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.
74+
When entering redaction mode in mobile view, a specialized redaction toolbar appears with tools optimized for touch. Each tool supports a specific step in the redaction workflow.
7575

76-
### Redaction Annotation Tool
76+
### Redaction annotation tool
7777

78-
The Redaction Annotation tool is the primary redaction feature that allows you to draw redaction rectangles on specific content:
78+
The Redaction Annotation tool creates rectangular overlays that mark content for removal.
7979

80-
Function: Creates visual redaction annotations that mark content for permanent removal
81-
Usage:
82-
Touch and drag to draw rectangular redaction overlays on any content area.
80+
Function: create visual redaction annotations that mark content for permanent removal.
81+
82+
Usage: touch and drag to draw rectangular redaction overlays.
8383

8484
Process:
85-
- Selected content appears with a customizable overlay (default black)
86-
- Annotations remain editable until explicitly applied
87-
- Can be repositioned or deleted before final application
8885

89-
![Redaction Annotation Tool](./redaction-annotations-images/redaction-annotation-annot.png)
86+
- Selected content shows a customizable overlay (default black).
87+
- Annotations remain editable until explicitly applied and can be repositioned or deleted.
88+
89+
![Redaction annotation tool overlay preview](./redaction-annotations-images/redaction-annotation-annot.png)
90+
91+
### Page redaction tool
92+
93+
The Page Redaction tool supports batch redaction of entire pages based on patterns.
94+
95+
![Page redaction tool options and dialog](./redaction-annotations-images/page-redaction-annot.png)
9096

91-
### Page Redaction Tool
97+
Function: redact complete pages or page ranges with one action.
9298

93-
The Page Redaction tool enables batch redaction of entire pages based on specific patterns.
99+
Options:
94100

95-
![Page Redaction Tool](./redaction-annotations-images/page-redaction-annot.png)
101+
- **Odd pages**: redact pages 1, 3, 5, etc.
102+
- **Even pages**: redact pages 2, 4, 6, etc.
103+
- **Specific pages**: specify single pages, ranges (for example, 1-5), or comma-separated lists (for example, 1,3,5-7).
104+
- **Current page**: redact the currently displayed page.
96105

97-
Function: Redacts complete pages or page ranges with a single action
98-
Options Available:
99-
- Odd Pages: Redacts only odd-numbered pages (1, 3, 5, etc.)
100-
- Even Pages: Redacts only even-numbered pages (2, 4, 6, etc.)
101-
- Specific Page: Specify single pages, ranges (e.g., 1-5, 10-15), or comma-separated lists (e.g., 1,3,5-7)
102-
- Current Page: Redacts only the currently displayed page
106+
Usage: choose a pattern, review affected pages in the viewer, and confirm the redaction scope.
103107

104-
Usage:
105-
Select desired pattern → Review affected pages in the viewer → Confirm redaction scope
108+
![Page redaction dialog preview](./redaction-annotations-images/page-redaction-dialog-annot.png)
106109

107-
![Page Redaction Tool Dialog](./redaction-annotations-images/page-redaction-dialog-annot.png)
110+
### Redaction properties tool
108111

109-
### Redaction Properties Tool
112+
The Redaction Properties tool customizes redaction appearance before applying changes.
110113

111-
The Redaction Properties tool allows customization of redaction appearance before application.
114+
![Redaction properties options preview](./redaction-annotations-images/redaction-properties-annot.png)
112115

113-
![Redaction Properties Mobile View](./redaction-annotations-images/redaction-properties-annot.png)
116+
Customizable properties include:
114117

115-
Function: Customize the visual appearance of redaction overlays and text replacement
116-
Customizable Properties:
117-
- Fill Color: Change the redaction overlay color (default: black)
118-
- Outline Color: Set outline color for redaction boxes (optional)
119-
- Overlay Text: Add custom text to appear on redacted areas (e.g., "REDACTED", "CONFIDENTIAL")
120-
- Text Color: Change overlay text color for better visibility
121-
- Text Font: Select font family for overlay text
122-
- Text Alignment: Position overlay text within redaction boxes
123-
- Text Size: Adjust overlay text size relative to redaction area
118+
- **Fill color**: redaction overlay color (default black).
119+
- **Outline color**: optional outline for redaction boxes.
120+
- **Overlay text**: custom text shown on redacted areas (for example, "REDACTED").
121+
- **Text color and font**: control visibility and style of overlay text.
122+
- **Text alignment and size**: position and scale overlay text within the redaction area.
124123

125-
![Redaction Properties Dialog Mobile View](./redaction-annotations-images/redaction-properties-dialog-annot.png)
124+
![Redaction properties dialog preview](./redaction-annotations-images/redaction-properties-dialog-annot.png)
126125

127-
## Enabling Redaction Mode in Mobile View
126+
## Enabling redaction mode in mobile view
128127

129-
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.
128+
1. Tap the Redaction button in the mobile toolbar to activate redaction mode; the redaction toolbar appears at the bottom of the viewer.
130129

131130
![Redaction toolbar displayed at bottom of mobile PDF viewer with three distinct tools](./redaction-annotations-images/redaction-mobile-view.png)
132131

133-
Step 2: From the redaction toolbar, select your desired redaction tool:
134-
- First Tool (Redaction Annotation): For selective content redaction
135-
- Second Tool (Page Redaction): For page-wide or pattern-based redaction
136-
- Third Tool (Redaction Properties): For appearance customization
132+
2. From the redaction toolbar, select a redaction tool:
137133

138-
Step 3: Configure your redaction parameters using the selected tool interface.
134+
- **Redaction Annotation**: selective content redaction.
135+
- **Page Redaction**: page-wide or pattern-based redaction.
136+
- **Redaction Properties**: configure appearance options.
139137

140-
## Applying Different Redaction Types in Mobile View
138+
3. Configure redaction parameters using the selected tool interface.
141139

142-
### Selective Content Redaction
143-
1. Select Redaction Annotation tool (first button)
144-
2. Choose Content: Tap and drag over text or draw rectangular areas
145-
3. Preview: Check redaction overlays for accuracy
146-
4. Apply: Tap "Apply Redactions" button
140+
## Applying different redaction types in mobile view
147141

148-
### Page-Wide Redaction
149-
1. Select Page Redaction tool (second button)
150-
2. Choose Pattern: Select odd pages, even pages, or custom range
151-
3. Review: Verify affected pages in the viewer
152-
4. Apply: Confirm page redaction scope and apply
142+
### Selective content redaction
153143

154-
### Custom Appearance Redaction
155-
1. Select Redaction Properties tool (third button)
156-
2. Customize: Adjust colors, overlay text, and formatting
157-
3. Preview: See changes applied to existing annotations
158-
4. Apply: Use customized appearance for final redaction
144+
1. Select the Redaction Annotation tool.
145+
2. Tap and drag to select content or draw rectangular areas.
146+
3. Preview overlays for accuracy.
147+
4. Tap **Apply Redactions** to apply selected annotations.
159148

160-
## Applying Redactions in Mobile View
149+
### Page-wide redaction
161150

162-
N> Applying redactions is permanent. After applying, the underlying content and text are removed from the document and cannot be recovered.
151+
1. Select the Page Redaction tool.
152+
2. Choose a pattern (odd, even, specific range).
153+
3. Review affected pages in the viewer.
154+
4. Confirm and apply redaction for chosen pages.
163155

164-
Once you have configured redactions using any combination of tools.
156+
### Custom appearance redaction
165157

166-
Step 1: Review all redaction marks and configurations.
158+
1. Select the Redaction Properties tool.
159+
2. Adjust colors, overlay text, and formatting.
160+
3. Preview changes on existing annotations.
161+
4. Apply to use the customized appearance for final redaction.
167162

168-
![Review Redaction Annotation](./redaction-annotations-images/review-redaction-annotation-mv-annot.png)
163+
## Applying redactions in mobile view
169164

170-
Step 2: Tap the Apply Redactions button in the redaction toolbar
165+
Note: Applying redactions is permanent. After applying, underlying content and extracted text are removed and cannot be recovered. Back up the original document before applying redactions.
171166

172-
![Apply Redaction Button](./redaction-annotations-images/apply-redaction-button-mv.png)
167+
After configuring redactions using any combination of tools:
173168

174-
Step 3: Confirm the action when prompted - this operation is permanent and cannot be undone
169+
1. Review all redaction marks and configurations.
175170

176-
![Apply Redaction Dialog](./redaction-annotations-images/apply-redaction-dialog-mv-annot.png)
171+
![Review redaction annotations before applying](./redaction-annotations-images/review-redaction-annotation-mv-annot.png)
172+
2. Tap the **Apply Redactions** button in the redaction toolbar.
177173

178-
The selected content will be permanently removed and replaced according to your redaction properties (solid color blocks or custom overlay text).
174+
![Apply redaction button in mobile view](./redaction-annotations-images/apply-redaction-button-mv.png)
179175

180-
![Applied Redaction](./redaction-annotations-images/applied-redaction-annot.png)
176+
3. Confirm the action when prompted — this operation is irreversible.
181177

182-
## Removing Redaction Annotations
178+
![Apply redaction confirmation dialog](./redaction-annotations-images/apply-redaction-dialog-mv-annot.png)
183179

184-
To remove existing redaction annotations before they are applied:
180+
The selected content is permanently removed and replaced according to redaction properties (solid overlays or custom overlay text).
181+
182+
![Result of applied redaction](./redaction-annotations-images/applied-redaction-annot.png)
185183

186-
- Step 1: Tap the Redaction Edit button in the mobile toolbar to enter annotation editing mode
187-
- Step 2: Tap on any existing redaction annotation you wish to remove
188-
- Step 3: Select Delete from the context menu that appears
184+
## Removing redaction annotations
185+
186+
To remove existing redaction annotations before they are applied:
189187

190-
Alternative: Tap redaction annotation → Use delete button in annotation properties panel
188+
1. Tap the Redaction Edit button in the mobile toolbar to enter annotation editing mode.
189+
2. Tap an existing redaction annotation to select it.
190+
3. Choose **Delete** from the context menu or use the delete option in the annotation properties panel.
191191

192-
![Delete Redaction Annotation](./redaction-annotations-images/delete-redaction-annotation-annot.png)
192+
![Delete a redaction annotation before applying](./redaction-annotations-images/delete-redaction-annotation-annot.png)
193193

194-
N> Once redactions have been applied to the document, they become part of the PDF content and cannot be removed or modified.
194+
N> Once redactions are applied they become part of the PDF content and cannot be removed or modified.
195195

196196
## See Also
197197

Document-Processing/PDF/PDF-Viewer/react/Redaction/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ domainurl: ##DomainURL##
1010

1111
# Redaction in React PdfViewer
1212

13-
Redaction annotations are used to hide confidential or sensitive information in a PDF. The Syncfusion React PDF Viewer (EJ2) lets you mark areas or entire pages for redaction, customize their appearance, and permanently apply them with a single action.
13+
Redaction annotations hide confidential or sensitive information in a PDF. The Syncfusion React PDF Viewer (EJ2) enables marking areas or entire pages for redaction, customizing appearance, and applying changes permanently.
1414

1515
## Enable the redaction toolbar
1616

@@ -109,7 +109,7 @@ A confirmation dialog appears before applying redaction to ensure you acknowledg
109109

110110
![Confirmation dialog for applying redaction](redaction-annotations-images/apply-redaction-dialog.png)
111111

112-
N> After redaction is applied, the original content cannot be recovered.
112+
N> After redaction is applied the original content cannot be recovered.
113113

114114
## Comment Support
115115

Document-Processing/PDF/PDF-Viewer/react/Redaction/programmatic-support.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ control: PdfViewer
77
documentation: ug
88
---
99

10-
# Programmatic support for redaction in React PdfViewer
10+
# Programmatic support for redaction in React PDF Viewer
1111

1212
The Syncfusion React PDF Viewer provides APIs to add, update, delete, and apply redaction annotations programmatically. You can also redact entire pages, configure default properties, and work with the redaction property panel.
1313

1414
## Enable the redaction toolbar
1515

1616
To enable the redaction toolbar, configure the `toolbarSettings.toolbarItems` property of the PdfViewer instance to include the **RedactionEditTool**.
1717

18-
The following example shows how to enable the redaction toolbar:
18+
The example below shows a PdfViewer with the redaction toolbar enabled:
1919

2020
{% tabs %}
2121
{% highlight js tabtitle="index.js" %}
@@ -70,6 +70,8 @@ root.render(<App />);
7070

7171
You can add redaction annotations to a PDF document using the `addAnnotation` method of the `annotation` module. You can listen to the `annotationAdd` event to track when annotations are added.
7272

73+
The example below adds a redaction annotation at a fixed location on the first page.
74+
7375
{% tabs %}
7476
{% highlight js tabtitle="index.js" %}
7577

@@ -186,6 +188,8 @@ root.render(<App />);
186188

187189
Redaction annotations can be removed using the `deleteAnnotationById` event or by selecting and deleting them through code.
188190

191+
This example removes a redaction annotation by id.
192+
189193
{% tabs %}
190194
{% highlight js tabtitle="index.js" %}
191195

@@ -281,12 +285,14 @@ root.render(<App />);
281285
{% endtabs %}
282286

283287

284-
Alternatively, you can remove annotations by selecting them in the UI and pressing the **Delete** key.
288+
Annotations can also be removed by selecting them in the UI and pressing the **Delete** key.
285289

286290
## Update redaction annotation properties programmatically
287291

288292
You can update properties of an existing redaction annotation using the `editAnnotation` API. For example, to change overlay text or fill color:
289293

294+
The example below updates properties of existing redaction annotations.
295+
290296
{% tabs %}
291297
{% highlight js tabtitle="index.js" %}
292298

@@ -399,6 +405,8 @@ root.render(<App />);
399405

400406
Entire pages can be marked for redaction using the `addPageRedactions` method:
401407

408+
This example marks full pages for redaction.
409+
402410
{% tabs %}
403411
{% highlight js tabtitle="index.js" %}
404412

@@ -496,6 +504,8 @@ root.render(<App />);
496504

497505
Once annotations are added, you can permanently apply them to the document using the `redact` method:
498506

507+
This example applies all pending redactions, permanently modifying the document.
508+
499509
{% tabs %}
500510
{% highlight js tabtitle="index.js" %}
501511

@@ -589,12 +599,14 @@ root.render(<App />);
589599
{% endhighlight %}
590600
{% endtabs %}
591601

592-
N> Applying redaction is irreversible. Once applied, the original content cannot be recovered.
602+
N> Applying redaction is irreversible. Create a backup of the original document before applying redactions; once applied, the original content cannot be recovered.
593603

594604
## Configure default redaction annotation properties
595605

596606
You can configure default properties for redaction annotations (such as fill color, overlay text, and font) when adding them programmatically:
597607

608+
The example below sets default redaction properties during viewer initialization.
609+
598610
{% tabs %}
599611
{% highlight js tabtitle="index.js" %}
600612

@@ -704,7 +716,7 @@ The redaction property panel allows users to update annotation properties throug
704716
## See also
705717

706718
* [Overview of Redaction](./overview)
707-
* [Redaction UI interactions](./ui-interaction)
719+
* [Redaction UI interactions](./ui-interactions)
708720
* [Redaction Toolbar](./toolbar)
709-
* [Reaction in Mobile view](./mobile-view)
721+
* [Redaction in Mobile view](./mobile-view)
710722
* [Search Text and Redact](./search-redact)

Document-Processing/PDF/PDF-Viewer/react/Redaction/search-redact.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Search text and redact in React PdfViewer
11+
# Search text and redact in React PDF Viewer
1212

13-
You can search for a keyword in the loaded PDF and automatically add redaction annotations over each match. The example below wires the extractTextCompleted event, triggers text extraction, performs a search, and places redaction annotations for every result.
13+
You can search for a keyword in the loaded PDF and automatically add redaction annotations over each match. The example below wires the `extractTextCompleted` event, triggers text extraction, performs a search, and places redaction annotations for every result.
1414

15-
N> Prerequisites: Add the PdfViewer control to your React application and ensure a document is loaded. Make sure the redaction feature is available in the version you are using. Once applied, redaction permanently removes the selected content.
15+
N> Prerequisites — add the PdfViewer control to your React application and ensure a document is loaded. Confirm that the redaction feature is available in the product version you are using. Create a backup of the original document before applying redactions; applied redactions are permanent and cannot be recovered.
1616

17-
## Steps to add Redaction annotations on search Text Bounds
17+
## Steps to add redaction annotations to search text bounds
1818

1919
**Step 1:** Follow the steps provided in the [link](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/react/getting-started) to create a simple PDF Viewer sample.
2020

21-
22-
**Step 2:** Use the following code-snippets to Add Redaction annotation on Search Text Bounds.
21+
**Step 2:** The example below searches for a term, adds redaction annotations for each match, and exposes a button to apply redactions. Use the following code snippets to add redaction annotations on search text bounds.
2322

2423
{% tabs %}
2524
{% highlight js tabtitle="index.js" %}
@@ -159,12 +158,12 @@ root.render(<App />);
159158
- Ensure the PDF is fully loaded before triggering extraction and search.
160159
- Bounds from search are in points (72 DPI). Convert to pixels (96 DPI) to align with annotation coordinates.
161160
- Customize overlay text, colors, and typography as needed.
162-
- Adding a redaction annotation covers the content visually. To permanently remove sensitive data, use the viewer's Apply Redaction action or equivalent API if available in your version.
161+
- Adding a redaction annotation only marks the content visually. To permanently remove sensitive data, use the viewer's Apply Redaction action or the `annotation.redact()` API; this operation is irreversible.
163162

164163
## See also
165164

166165
* [Overview of Redaction](./overview)
167166
* [Programmatic Support in Redaction](./programmatic-support)
168-
* [UI interactions](./ui-interaction)
167+
* [Redaction UI interactions](./ui-interactions)
169168
* [Redaction in Mobile View](./mobile-view)
170169
* [Redaction Toolbar](./toolbar)

0 commit comments

Comments
 (0)