Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a476761
updated the add-annotation-in-text-search.md file
Logeshwaran-SyncGit Jul 14, 2026
fc3473c
updated the add-header-value.md file
Logeshwaran-SyncGit Jul 14, 2026
6c96790
updated the add-save-button.md file
Logeshwaran-SyncGit Jul 14, 2026
f5d0b4f
updated add-signature.md file
Logeshwaran-SyncGit Jul 14, 2026
02a1c8b
updated annotation-selectors.md file
Logeshwaran-SyncGit Jul 14, 2026
68d5722
updated authorization-token.md file
Logeshwaran-SyncGit Jul 14, 2026
7eb6a9e
updated change-author-name-using-annotation-settings.md file
Logeshwaran-SyncGit Jul 14, 2026
3403e7f
clear-annotation.md file
Logeshwaran-SyncGit Jul 14, 2026
fd5c4b5
updated the configure-annotation-selector-setting.md file
Logeshwaran-SyncGit Jul 14, 2026
66012b2
updated the conformance.md file
Logeshwaran-SyncGit Jul 14, 2026
9f27a08
updated the control-annotation-visibility.md file
Logeshwaran-SyncGit Jul 14, 2026
19ef0b9
updated convert-pdf-library-bounds-to-pdf-viewer-bounds.md file
Logeshwaran-SyncGit Jul 14, 2026
8b79f64
convert-pixel-to-point-in-server-side.md file
Logeshwaran-SyncGit Jul 14, 2026
d7044e4
updated create-and-run-custom-pdf-viewer-web-service.md file
Logeshwaran-SyncGit Jul 14, 2026
06c84c4
updated custom-font-signature-field.md file
Logeshwaran-SyncGit Jul 14, 2026
00c2d6c
updated the custom-fonts.md file
Logeshwaran-SyncGit Jul 14, 2026
6c24719
updated the delete-annotation.md file
Logeshwaran-SyncGit Jul 14, 2026
9cb2534
updated the download-start-event.md file
Logeshwaran-SyncGit Jul 14, 2026
0815d82
updated enable-local-storage.md file
Logeshwaran-SyncGit Jul 14, 2026
47444eb
updated the enable-text-selection.md file
Logeshwaran-SyncGit Jul 14, 2026
1089199
updated the existing-react-layout.md file
Logeshwaran-SyncGit Jul 14, 2026
8876bed
updated the extract-text-completed.md file
Logeshwaran-SyncGit Jul 14, 2026
c586190
updated extract-text-option.md file
Logeshwaran-SyncGit Jul 14, 2026
68fbadf
updated the extract-text.md file
Logeshwaran-SyncGit Jul 14, 2026
d6fb3e6
updated the find-text-async.md file
Logeshwaran-SyncGit Jul 14, 2026
663afbb
updated the get-base64.md file
Logeshwaran-SyncGit Jul 14, 2026
f32971e
updated the getPageInfo.md file
Logeshwaran-SyncGit Jul 14, 2026
5f0d805
Resolve 24 CI errors
Logeshwaran-SyncGit Jul 15, 2026
f5db06b
Resolve the front and spelling errors
Logeshwaran-SyncGit Jul 15, 2026
670286b
Resolve CI error
Logeshwaran-SyncGit Jul 15, 2026
f3bd2f2
updated configure-annotation-selector-setting.md file
Logeshwaran-SyncGit Jul 15, 2026
b32aeed
removed extra spaces
Logeshwaran-SyncGit Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ platform: document-processing
documentation: ug
---

# Add Annotations via Text Search in PDF Viewer
# Create Annotations from PDF Text Search Results

A concise guide that demonstrates how to add rectangle and highlight annotations at highlighted text search results in the React PDF Viewer. The guide explains where to wire the callback, required services, and quick troubleshooting steps.
A concise guide that demonstrates how to add rectangle and highlight annotations to text matched by a search in the Syncfusion React PDF Viewer. The guide explains where to wire the callback and the required services.

## Prerequisites

Expand All @@ -19,7 +19,7 @@ A React PDF Viewer setup with [`Annotation`](https://ej2.syncfusion.com/react/do

**Step 1:** Follow the steps provided in the [Syncfusion<sup style="font-size:70%">&reg;</sup> Getting Started Guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/react/getting-started) to set up a basic PDF Viewer sample.

**Step 2a:** Set up the PDF Viewer component to add rectangle annotations based on the bounds of highlighted search text in the PDF Viewer.
**Step 2a:** Add a rectangle annotation based on the bounds of each highlighted search match.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
Expand Down Expand Up @@ -96,7 +96,7 @@ export default function App() {

**Expected result:** Rectangle annotations are added at text search result locations, improving visibility for users navigating search matches.

**Step 2b:** Set up the PDF Viewer component to add highlight annotations based on the bounds of highlighted search text in the PDF Viewer.
**Step 2b:** Add a highlight annotation based on the bounds of each highlighted search match.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,23 @@ control: PDF Viewer
documentation: ug
---

# Add header values in the React PDF Viewer
# Add header values to AJAX requests in the React PDF Viewer

Use the `ajaxHeaders` property inside the PDF Viewer’s [ajaxRequestSettings](https://ej2.syncfusion.com/React/documentation/api/pdfviewer/#ajaxrequestsettings) to send custom HTTP headers with each request made by the viewer.
Use the `ajaxHeaders` property inside the PDF Viewer’s [ajaxRequestSettings](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#ajaxrequestsettings) to send custom HTTP headers with each request made by the viewer.

Example: Add a custom Authorization header using `ajaxRequestSettings` in an React component
Example: Add a custom Authorization header using `ajaxRequestSettings` in a React component

```ts

viewer.ajaxRequestSettings = {
ajaxHeaders: [
{
headerName: "Authorization",

headerValue: "Bearer 64565dfgfdsjweiuvbiuyhiueygf"
}
],

withCredentials: false
};

```

Find the sample [how to add custom headers in AjaxRequestSettings](https://stackblitz.com/edit/react-dnkbqh66-tnifjnlb?file=package.json,index.js)
26 changes: 13 additions & 13 deletions Document-Processing/PDF/PDF-Viewer/react/how-to/add-save-button.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: Add Save Button to Toolbar in React PDF Viewer
title: Add a Save Button to the Toolbar in Syncfusion React PDF Viewer
description: Learn how to add, show, hide, enable, and disable a custom Save button in the built-in toolbar of the React PDF Viewer component.
control: Toolbar
platform: document-processing
Expand All @@ -12,11 +12,11 @@ domainurl: ##DomainURL##

PDF Viewer supports customizing toolbar items, including adding, showing, hiding, enabling, and disabling items.

* Save button: The Save button can be defined using [CustomToolbarItemModel](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/customToolbarItemModel/) and included alongside existing items via [ToolbarSettings](https://ej2.syncfusion.com//react/documentation/api/file-manager/toolbarSettings/). Handle the click action using [`toolbarclick`](https://ej2.syncfusion.com/react/documentation/api/file-manager/toolbarClickEventArgs/).
* Save button: The Save button can be defined using [CustomToolbarItemModel](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/customToolbarItemModel) and included alongside existing items via [ToolbarSettings](https://ej2.syncfusion.com//react/documentation/api/file-manager/toolbarSettings). Handle the click action using [`toolbarclick`](https://ej2.syncfusion.com/react/documentation/api/file-manager/toolbarClickEventArgs).

* Show or hide: The Save button can be shown or hidden using [ToolbarSettings](https://ej2.syncfusion.com/react/documentation/api/file-manager/toolbarSettings/). Predefined items are listed under [`ToolbarItem`](https://ej2.syncfusion.com/react/documentation/api/chart/toolbarItems/).
* Show or hide: The Save button can be shown or hidden using [ToolbarSettings](https://ej2.syncfusion.com/react/documentation/api/file-manager/toolbarSettings). Predefined items are listed under [`ToolbarItem`](https://ej2.syncfusion.com/react/documentation/api/chart/toolbarItems).

* Enable or disable: The Save button can be enabled or disabled using [`enabletoolbaritem`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbar/).
* Enable or disable: The Save button can be enabled or disabled using [`enabletoolbaritem`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbar).

{% tabs %}
{% highlight js tabtitle="Standalone" %}
Expand All @@ -38,13 +38,13 @@ function OnCreateSearch() {
this.addIcon('prepend', 'e-icons e-search');
}

var toolItem1 = {
const toolItem1 = {
prefixIcon: 'e-icons e-save',
id: 'download',
text: 'Save',
tooltipText: 'Save button',
align: 'Left'
};
};

function toolbarClick(args){
if (args.item && args.item.id === 'download') {
Expand Down Expand Up @@ -90,16 +90,16 @@ function OnCreateSearch() {
this.addIcon('prepend', 'e-icons e-search');
}

var toolItem1 = {
const toolItem1 = {
prefixIcon: 'e-icons e-save',
id: 'download',
text: 'Save',
tooltipText: 'Save button',
align: 'Left'
};
};

function toolbarClick(args){
var viewer = document.getElementById('container').ej2_instances[0];
const viewer = document.getElementById('container').ej2_instances[0];
if (args.item && args.item.id === 'download') {
viewer.download();
}
Expand Down Expand Up @@ -131,7 +131,7 @@ N> Default toolbar items include: ['OpenOption', 'PageNavigationTool', 'Magnific

### Align property

Specifies the alignment of the Save button within the toolbar:
Specifies the alignment of the Save button within the toolbar. Valid values are:

* Left: aligns the item to the left side of the toolbar.
* Right: aligns the item to the right side of the toolbar.
Expand All @@ -144,17 +144,17 @@ Sets the tooltip text for the Save button; the tooltip appears on hover.

Applies custom CSS classes to the Save button for styling.

### Prefix property
### prefixIcon property

Sets the CSS class or icon to display before the Save button text.

### ID property

The id property within a CustomToolbarItemModel is required and uniquely identifies each toolbar item for configuration and interaction.
The `id` property within a `CustomToolbarItemModel` is required and uniquely identifies each toolbar item for configuration and interaction.

When defining or customizing toolbar items, assign a specific, descriptive id to each item. These properties are commonly used when defining custom toolbar items with `CustomToolbarItemModel` in the context of Syncfusion PDF Viewer. When configuring the toolbar using the `ToolbarSettings` property, include these properties to customize appearance and behavior.


N> When customizing the Save button, icons or text can be used based on design preference.
N> When customizing the Save button, you can use an icon, text, or both, depending on your design preference.

[View sample in GitHub](https://github.com/SyncfusionExamples/react-pdf-viewer-examples/tree/master/How%20to)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Add signature in React Pdfviewer component | Syncfusion
description: Learn here all about Add signature in Syncfusion React Pdfviewer component of Syncfusion Essential JS 2 and more.
title: Add signature in React PDF Viewer component | Syncfusion
description: Learn how to programmatically add a signature to a signature field in the Syncfusion React PDF Viewer component.
control: Add signature
platform: document-processing
documentation: ug
Expand All @@ -14,7 +14,7 @@ The PDF Viewer library allows adding a signature to a signature field in a loade

Follow these steps

1. Follow the Syncfusion [getting-started](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/react/getting-started/) guide for React PDF Viewer.
1. Follow the Syncfusion [getting-started](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/react/getting-started) guide for React PDF Viewer.
2. Add the following code snippet to handle signature field clicks and set or clear the signature value.

{% tabs %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
---
layout: post
title: Customize annotation selectors in React PDF Viewer
title: Customize Annotation Selectors in Syncfusion React PDF Viewer
description: Learn how to customize annotation selectors in the React PDF Viewer component using annotationSelectorSettings with examples.
platform: document-processing
control: PDF Viewer
documentation: ug
domainurl: ##DomainURL##
---

# Customize annotation selectors in TypeScript PDF Viewer
# Configure Annotation Selector Settings for Better User Interaction

Use the [annotationSelectorSettings](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/#annotationselectorsettings) property to configure the appearance and behavior of annotation selectors. This includes selection handles and resizers (for example, handle shape and size), which determine how users interact with annotations during editing.
Use the [annotationSelectorSettings](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationSelectorSettings) property to configure the appearance and behavior of annotation selectors. These include selection handles and resizer (for example, handle shape and size), which determine how users interact with annotations during editing.

The example below changes the selector's resizer handle shape to circular and opens an existing annotation for editing. Setting `resizerShape = 'Circle'` updates the selector appearance to circular resizer handles; ensure an annotation exists before calling `editAnnotation` to avoid runtime errors.
The example below changes the selector's resizer handle shape to circular and opens an existing annotation for editing. Setting `resizerShape` updates the selector appearance to circular handles. Ensure an annotation exists before calling `editAnnotation` to avoid runtime errors.

```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
layout: post
title: Authorization token in React Pdfviewer component | Syncfusion
description: Learn here all about Authorization token in Syncfusion React Pdfviewer component of Syncfusion Essential JS 2 and more.
control: Authorization token
title: Authorization token in React PDF Viewer component | Syncfusion
description: Learn how to securely pass an authorization token to the Syncfusion React PDF Viewer for authenticated document access and API requests.
control: PDF Viewer
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---

## Authorization token in React PDF Viewer component
# Authorization token in React PDF Viewer component

This article shows how to include an authorization token in AJAX requests issued by the React PDF Viewer by using the `ajaxRequestSettings` property. The token is included in every AJAX request sent by the viewer when configured via `ajaxHeaders`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ domainurl: ##DomainURL##

The `annotationSettings` API provides a central way to configure properties that apply to all annotations in the viewer.

API name: annotationSettings
API: `annotationSettings` — see the [API reference](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationsettingsmodel) for the full model.

| Property Name | Data type & Default Value | Description |
|---|---|---|
Expand All @@ -27,7 +27,7 @@ API name: annotationSettings
| Free Text Settings |
| allowOnlyTextInput | Boolean (false) | Specifies text-only mode for free text annotations. If true, moving or resizing is disabled. |

Change the author name and other properties using the annotationSettings API as shown below.
Change the author name and other properties using the `annotationSettings` API as shown below.

{% tabs %}
{% highlight ts tabtitle="Standalone" %}
Expand Down Expand Up @@ -55,4 +55,12 @@ viewer.freeTextSettings = { allowTextOnly : true };
viewer.appendTo("#pdfViewer");

{% endhighlight %}
{% endtabs %}
{% endtabs %}

## See also

- [Annotation permissions in React](../annotation/annotation-permission)
- [Free text annotation](../annotation/annotation-types/free-text-annotation)
- [Customize annotation](../annotation/customize-annotation)
- [Annotations API](../annotation/annotations-api)
- [React PDF Viewer – Getting started](../getting-started)
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ function deleteAnnotations() {

To remove a specific annotation, use the deleteAnnotationById method to target an annotation by its id.

Example: Delete a specific annotation by id
Example: Delete a specific annotation by ID

```html
<button onclick="deleteAnnotationbyId()">Delete Annotation by ID</button>
<button onclick="deleteAnnotationById()">Delete Annotation by ID</button>

<script>
// Delete an annotation by id
function deleteAnnotationbyId() {
function deleteAnnotationById() {
var viewer = document.getElementById("container").ej2_instances[0];
if (viewer.annotationCollection && viewer.annotationCollection.length > 0) {
viewer.annotationModule.deleteAnnotationById(viewer.annotationCollection[0].annotationId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
---
layout: post
title: Configure annotation selector settings in React PDF Viewer | Syncfusion
description: Learn how to configure annotation selector settings in the React PDF Viewer using annotationSelectorSettings and related options.
title: Configure Annotation Selector Settings in Syncfusion React PDF Viewer
description: Learn how to configure annotation selector settings in the React PDF Viewer using the AnnotationSelectorSettings and related options.
control: PDF Viewer
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---

# Configure annotation selector settings
# Personalize Annotation Selection Settings in React PDF Viewer

Use the [annotationSelectorSettings](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationSelectorSettings/) property to customize the appearance and interaction behavior of the annotation selector in the react PDF Viewer UI.
Use the [annotationSelectorSettings](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationSelectorSettings) property to customize the appearance and interaction behavior of the annotation selector in the React PDF Viewer UI.

AnnotationSelectorSettingsModel

The [AnnotationSelectorSettingsModel](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationSelectorSettingsModel/) defines selector appearance and behavior settings—such as border colors, resizer appearance, and selector line style—providing fine-grained control over how annotations are displayed and manipulated.
The [AnnotationSelectorSettingsModel](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationSelectorSettingsModel) defines selector appearance and behavior settings—such as border colors, resizer appearance, and selector line style—providing fine-grained control over how annotations are displayed and manipulated.

Steps to configure annotation selector settings
- Step 1: Create a PDF Viewer instance and initialize it.
Expand Down Expand Up @@ -53,7 +51,7 @@ Key properties
- selectionBorderThickness: Specifies the thickness of the selection border.
- resizerShape: Sets the shape of the resizer handles (for example, Circle or Square).
- selectorLineDashArray: Specifies the dash pattern for the selector line.
- resizerLocation: Determines where the resizers appear relative to the annotation (for example, Corners or Edges).
- resizerLocation: Determines where the resizer appear relative to the annotation (for example, Corners or Edges).
- resizerCursorType: Sets the cursor style when hovering over a resizer.

[View sample in GitHub](https://github.com/SyncfusionExamples/react-pdf-viewer-examples/tree/master/How%20to)
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: post
title: Supported PDF conformance levels | Syncfusion
description: Learn about the supported PDF/A and PDF/X conformance levels in the React PDF Viewer component.
title: PDF Conformance Levels Supported by Syncfusion PDF Library
description: Learn about the PDF/A and PDF/X conformance levels supported in Syncfusion PDF tools and understand compliance options for PDF standards.
platform: document-processing
control: PDF Viewer
documentation: ug
---

# Supported PDF conformance in React PDF Viewer

The Angular PDF Viewer supports the following PDF/A and PDF/X conformance levels:
The React PDF Viewer supports the following PDF/A and PDF/X conformance levels:

* PDF/A-1a
* PDF/A-1b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation: ug
domainurl: ##DomainURL##
---

# Control annotation visibility in PDF Viewer
# Control annotation visibility in PDF Viewer (React)

## Overview

Expand All @@ -29,11 +29,10 @@ Create an React component and update the template to include a button that trigg
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import './index.css';
import {PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner,PageOrganizer, Inject, DynamicStampItem, SignStampItem, StandardBusinessStampItem, DisplayMode
} from '@syncfusion/ej2-react-pdfviewer';
import { PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, PageOrganizer, Inject } from '@syncfusion/ej2-react-pdfviewer';

// Import PdfAnnotationFlag and PdfDocument from the Syncfusion PDF library.
import { PdfAnnotationFlag, PdfDocument} from '@syncfusion/ej2-pdf';
import { PdfAnnotationFlag, PdfDocument } from '@syncfusion/ej2-pdf';

function App() {
return (<div>
Expand All @@ -46,16 +45,17 @@ function App() {
</div>
</div>);
function Save() {
// Get the PDF viewer instance
// Get the PDF viewer instance.
var viewer = document.getElementById('container').ej2_instances[0];

// Save the current PDF document as a Blob
// saveAsBlob() returns the current PDF as a Blob.
viewer.saveAsBlob().then((blob) => {
const reader = new FileReader();
reader.onload = function () {
// Convert Blob to Base64 format
// Convert Blob to Base64 format.
const base64data = reader.result;

// Strip the data URL prefix so the PdfDocument constructor receives raw Base64.
const base64EncodedData = base64data.split('base64,')[1];
const document1 = new PdfDocument(base64EncodedData);

Expand All @@ -64,12 +64,12 @@ function Save() {
const page = document1.getPage(i);
for (let j = 0; j < page.annotations.count; j++) {
const annot = page.annotations.at(j);
// Set the PdfAnnotationFlag to noView to ensure annotations are only visible in our viewer
// Set the PdfAnnotationFlag to noView; the Syncfusion viewer ignores this flag at render time.
annot.flags |= PdfAnnotationFlag.noView;
}
}

// Save the modified document as Blob
// Save the modified document as Blob.
document1.saveAsBlob().then((modifiedBlob) => {
const internalReader = new FileReader();
internalReader.onload = function () {
Expand Down
Loading