Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/text-search">Text Search</a></li>
<li>Annotation
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/annotation/overview">Overview</a></li>
<li>Annotation Types
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/annotation/annotation-types/highlight-annotation">Highlight</a></li>
Expand Down Expand Up @@ -384,6 +385,14 @@
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/annotation/annotations-api">APIs</a></li>
</ul>
</li>
<li>Document Handling
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/document-handling/load-large-pdf">Load Large PDF Files</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/document-handling/load-password-pdf">Load Password Protected PDFs</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/document-handling/preprocess-pdf">Preprocess PDF Document Before Displaying</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/document-handling/retrieve-loadedDoc">Retrieve the Loaded Document Instance </a></li>
</ul>
</li>
<li>Redaction
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/asp-net-core/Redaction/overview">Overview</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ You can apply multiple filter criteria simultaneously:
3. Set the **Annotation Type** to "Highlight"
4. Set the **Status** to "Accepted"
5. Click **APPLY**
6. Result: Only highlights created by John Smith with "Accepted" status are displayed

Only highlights created by John Smith with "Accepted" status are displayed.

### Filter settings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
layout: post
title: Annotation Events in ASP.NET Core PDF Viewer | Syncfusion
description: Comprehensive guide to annotation events in the Syncfusion ASP.NET Core PDF Viewer component with runnable examples.
platform: document-processing
control: PDF Viewer
documentation: ug
domainurl: ##DomainURL##
---

# Annotation Events in ASP.NET Core PDF Viewer

The PDF Viewer component triggers various events based on user interactions and annotation changes. These events allow to respond to specific annotation operations such as adding, removing, selecting, moving, and resizing annotations. Signature-related events can also be monitored for signature lifecycle management.
The PDF Viewer component triggers various events based on user interactions and annotation changes. These events allow responding to specific annotation operations such as adding, removing, selecting, moving, and resizing annotations. Signature-related events can also be monitored for signature life cycle management.

## Available events

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

# Annotation permissions in ASP.NET Core

Use [annotationSettings](hhttps://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_AnnotationSettings) to control creation-time permissions and default behavior for annotations in the PDF Viewer. These settings establish defaults for annotations created through the UI and programmatic flows.
Use [annotationSettings](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_AnnotationSettings) to control creation-time permissions and default behavior for annotations in the PDF Viewer. These settings establish defaults for annotations created through the UI and programmatic flows.

## Common permissions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ window.onload = function () {
- **Move**: Drag inside the polygon to reposition it.
- **Reshape**: Drag any vertex handle to adjust points and shape.

### Edit Perimeter
### Edit Area Appearance

#### Edit Perimeter (UI)
#### Edit Area Appearance (UI)

- Edit the **fill color** using the Edit Color tool.
![Fill color](../../images/calibrate_fillcolor.png)
Expand Down Expand Up @@ -155,9 +155,9 @@ function editAreaProgrammatically() {
{% endhighlight %}
{% endtabs %}

### Delete Distance Annotation
### Delete Area Annotation

Delete Distance Annotation via UI (toolbar/context menu) or programmatically. For supported workflows and APIs, see [**Delete Annotation**](../remove-annotations).
Delete Area Annotation via UI (toolbar/context menu) or programmatically. For supported workflows and APIs, see [**Delete Annotation**](../remove-annotations).

## Set Default Properties During Initialization
Apply defaults for Area using the [`areaSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_AreaSettings) property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ N> For **Line** and **Arrow** annotations, **Fill Color** is available only when
### Edit Arrow

#### Edit Arrow (UI)
- Select a Arrow to view resize handles.
- Select an Arrow to view resize handles.
- Drag endpoints to adjust length/angle.
- Edit stroke color, opacity, and thickness using the annotation toolbar.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ Configure default highlight settings such as **color**, **opacity**, and **autho
<ejs-pdfviewer id="pdfviewer"
style="height:650px"
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
resourceUrl="https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
height="650px">
resourceUrl="https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib">
</ejs-pdfviewer>
</div>
<script>
Expand Down Expand Up @@ -168,7 +167,7 @@ For detailed behavior, supported deletion workflows, and API reference, see [Del

### Comments

Use the [Comments panel](../comments) to add, view, and reply to threaded discussions linked to underline annotations.
Use the [Comments panel](../comments) to add, view, and reply to threaded discussions linked to highlight annotations.
It provides a dedicated UI for reviewing feedback, tracking conversations, and collaborating on annotation‑related notes within the PDF Viewer.

## Set properties while adding Individual Annotation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In the ASP.NET Core PDF Viewer, annotation modules such as Ink are enabled by de
![Ink tool](../../images/ink_tool.png)

### Enable Ink Mode
Switch the viewer into a ink annotation mode programmatically.
Switch the viewer into an ink annotation mode programmatically.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down Expand Up @@ -154,7 +154,7 @@ function editInkProgrammatically() {
{% endhighlight %}
{% endtabs %}

### Delete Stamp
### Delete Ink

Delete Ink via UI (toolbar/context menu) or programmatically. For supported workflows and APIs, see [**Delete Annotation**](../remove-annotations).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ function editPerimeterProgrammatically() {
{% endhighlight %}
{% endtabs %}

### Delete Distance Annotation
### Delete Perimeter Annotation

Delete Distance Annotation via UI (toolbar/context menu) or programmatically. For supported workflows and APIs, see [**Delete Annotation**](../remove-annotations).
Delete Perimeter Annotation via UI (toolbar/context menu) or programmatically. For supported workflows and APIs, see [**Delete Annotation**](../remove-annotations).

## Set Default Properties During Initialization
Apply defaults for Perimeter using the [`perimeterSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_PerimeterSettings) property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In the ASP.NET Core PDF Viewer, annotation modules such as Polygon annotation ar
{% endhighlight %}
{% endtabs %}

## Add Polygon Annotation
## Add Polygon Annotation

### Add Polygon Annotation Using the Toolbar
1. Open the **Annotation Toolbar**.
Expand Down Expand Up @@ -116,11 +116,11 @@ window.onload = function () {

## Manage Polygon (Edit, Move, Resize, Delete)

### Edit Circle
### Edit Polygon

#### Edit Circle (UI)
#### Edit Polygon (UI)

- Select a Circle to view resize handles.
- Select a Polygon to view resize handles.
- Drag any side/corner to resize; drag inside the shape to move it.
- Edit **fill**, **stroke**, **thickness**, and **opacity** using the annotation toolbar.

Expand All @@ -141,7 +141,7 @@ Use the annotation toolbar:

#### Edit Polygon Programmatically

Modify an existing Circle programmatically using `editAnnotation()`.
Modify an existing Polygon programmatically using `editAnnotation()`.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function exitRadiusMode() {
{% endtabs %}

### Add Radius Programmatically
Configure default properties using the [`Radius Settings`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_RadiusSettings) property (for example, default **fill color**, **stroke color**, **opacity**).
Use the [`addAnnotation`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/index-default#addannotation) API to add a Radius measurement at a specific location.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function editFirstRedaction(){
{% endhighlight %}
{% endtabs %}

This mirrors the TS logic using the ASP.NET Core component ref to access the annotation APIs.
This uses the PDF Viewer instance to access the annotation APIs.

## Delete redaction annotations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function editStickyNotesProgrammatically() {
var coll = viewer.annotationCollection || [];
for (var i = 0; i < coll.length; i++) {
var ann = coll[i];
if (ann.subject === 'Volume calculation') {
if (ann.subject === 'Sticky Note') {
ann.strokeColor = '#0000FF';
ann.thickness = 2;
ann.opacity = 0.8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ Use the [**Comments panel**](../comments) to add, view, and reply to threaded di
Set properties for individual annotations when adding them programmatically by supplying fields on each `addAnnotation('Strikethrough', …)` call.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
{% highlight cshtml tabtitle="Standalone" %}
<script>
function addMultipleStrikethroughs() {
const viewer = document.getElementById('container').ej2_instances[0];
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
// Strikethrough 1
viewer.annotation.addAnnotation('Strikethrough', {
bounds: [{ x: 100, y: 150, width: 320, height: 14 }],
Expand All @@ -178,6 +179,7 @@ function addMultipleStrikethroughs() {
opacity: 0.9
});
}
</script>
{% endhighlight %}
{% endtabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ Use the [**Comments panel**](../comments) to add, view, and reply to threaded di
Set properties for individual annotations when adding them programmatically by supplying fields on each `addAnnotation('Underline', …)` call.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
{% highlight cshtml tabtitle="Standalone" %}
<script>
function addMultipleUnderlines() {
const viewer = document.getElementById('container').ej2_instances[0];
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
// Underline 1
viewer.annotation.addAnnotation('Underline', {
bounds: [{ x: 100, y: 150, width: 320, height: 14 }],
Expand All @@ -180,6 +181,7 @@ function addMultipleUnderlines() {
opacity: 0.9
});
}
</script>
{% endhighlight %}
{% endtabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function exitVolumeMode() {
{% endtabs %}

### Add Volume Programmatically
Configure default properties using the [`volumeSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_VolumeSettings) property (for example, default **fill color**, **stroke color**, **opacity**).
Use the [`addAnnotation`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/index-default#addannotation) API to add a Volume measurement at a specific location.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Undo and Redo annotation in Core PDF Viewer | Syncfusion
Syncfusion description: Learn to undo and redo annotation changes in Syncfusion ASP.NET Core PDF Viewer, with UI and programmatic examples.
description: Learn to undo and redo annotation changes in Syncfusion ASP.NET Core PDF Viewer, with UI and programmatic examples.
platform: aspnet-core
control: PDF Viewer
documentation: ug
Expand All @@ -25,6 +25,10 @@ Refer to the following code snippet to call undo and redo actions from the clien

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
<div style="margin-bottom:8px">
<button onclick="undoAnnotation()">Undo</button>
<button onclick="redoAnnotation()">Redo</button>
</div>
<div style="width:100%;height:600px">
<ejs-pdfviewer id="pdfviewer"
style="height:600px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ You can edit comments in two ways:

### Add comments and replies programmatically

Comments can be added to the PDF document programmatically using the `editAnnotation` property.
Comments can be added to the PDF document programmatically using the `editAnnotation` method.

The following example Shows how to add comments and reply in response to a button click.
The following example shows how to add comments and reply in response to a button click.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down Expand Up @@ -160,9 +160,9 @@ window.onload = function() {

### Edit comments and replies programmatically

Comments can be edited in the PDF document programmatically using the `editAnnotation` property.
Comments can be edited in the PDF document programmatically using the `editAnnotation` method.

The following example Shows how to edit comments and reply in response to a button click.
The following example shows how to edit comments and reply in response to a button click.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Shape annotations:
- Line: [Line annotation](./annotation-types/line-annotation)
- Arrow: [Arrow annotation](./annotation-types/arrow-annotation)
- Rectangle: [Rectangle annotation](./annotation-types/rectangle-annotation)
- Circle : [Circle annotation](./annotation-types/circle-annotation)
- Circle: [Circle annotation](./annotation-types/circle-annotation)
- Polygon: [Polygon annotation](./annotation-types/polygon-annotation)

Measurement annotations:
Expand Down Expand Up @@ -61,7 +61,7 @@ N> Each annotation type page includes both UI steps and programmatic examples sp

Note:
- When pan mode is active and a shape or stamp tool is selected, the viewer switches to text select mode automatically.
- Property pickers in the annotation toolbar let users choose color, stroke color, thickness, and opacity while drawing
- Property pickers in the annotation toolbar let users choose color, stroke color, thickness, and opacity while drawing.

### Create programmatically

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Custom Data in annotations in ASP.NET Core PDF Viewer | Syncfusion
description: Learn here all about how to use add custom Data in annotation in Syncfusion ASP.NET Core PDF Viewer Component.
description: Learn to add custom data to PDF annotations in Syncfusion ASP.NET Core PDF Viewer and access, store, and manage metadata efficiently.
platform: document-processing
control: PDF Viewer
documentation: ug
Expand Down Expand Up @@ -48,7 +48,7 @@ window.onload = function() {
{% endhighlight %}
{% endtabs %}

## Custom data for Individual Annotation
## Custom data for individual annotation

Provide customData inside individual annotation-type settings when you want specific payloads for different tools.

Expand Down Expand Up @@ -132,12 +132,12 @@ window.onload = function() {
- [Annotation Overview](../overview)
- [Annotation Types](../annotations/annotation-types/area-annotation)
- [Annotation Toolbar](../toolbar-customization/annotation-toolbar)
- [Create and Modify Annotation](../annotations/create-modify-annotation)
- [Customize Annotation](../annotations/customize-annotation)
- [Remove Annotation](../annotations/delete-annotation)
- [Handwritten Signature](../annotations/signature-annotation)
- [Export and Import Annotation](../annotations/export-import/export-annotation)
- [Annotation Permission](../annotations/annotation-permission)
- [Annotation in Mobile View](../annotations/annotations-in-mobile-view)
- [Annotation Events](../annotations/annotation-event)
- [Annotation API](../annotations/annotations-api)
- [Create and Modify Annotation](../annotation/create-modify-annotation)
- [Customize Annotation](../annotation/customize-annotation)
- [Remove Annotation](../annotation/delete-annotation)
- [Handwritten Signature](../annotation/signature-annotation)
- [Export and Import Annotation](../annotation/export-import/export-annotation)
- [Annotation Permission](../annotation/annotation-permission)
- [Annotation in Mobile View](../annotation/annotations-in-mobile-view)
- [Annotation Events](../annotation/annotation-event)
- [Annotation API](../annotation/annotations-api)
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ domainurl: ##DomainURL##

# Customize annotations in ASP.NET Core

Annotation appearance and behavior (for example color, stroke color, thickness, and opacity) can be customized using the built‑in UI or programmatically. This page summarizes common customization patterns and shows how to set defaults per annotation type.
Annotation appearance and behavior (for example, color, stroke color, thickness, and opacity) can be customized using the built‑in UI or programmatically. This page summarizes common customization patterns and shows how to set defaults per annotation type.

## Customize via UI

Use the annotation toolbar after selecting an annotation:
- Edit color: changes the annotation fill/text color
- Edit color: changes the annotation fill or text color
![Edit color](../images/edit_color.png)
- Edit stroke color: changes border or line color for shapes and lines types.
- Edit stroke color: changes border or line color for shapes and lines.
![Edit stroke color](../images/shape_strokecolor.png)
- Edit thickness: adjusts border or line thickness
![Edit thickness](../images/shape_thickness.png)
Expand All @@ -35,7 +35,7 @@ Text markup annotations:
- Highlight: Set default properties before creating the control using [`highlightSettings`](./annotation-types/highlight-annotation#set-properties-while-adding-individual-annotation)
- Strikethrough: Use [`strikethroughSettings`](./annotation-types/strikethrough-annotation#set-properties-while-adding-individual-annotation)
- Underline: Use [`underlineSettings`](./annotation-types/underline-annotation#set-properties-while-adding-individual-annotation)
- Squiggly: Use [`squigglySettings`](./annotation-types/Squiggly-annotation#set-properties-while-adding-individual-annotation)
- Squiggly: Use [`squigglySettings`](./annotation-types/squiggly-annotation#set-properties-while-adding-individual-annotation)

Shape annotations:

Expand Down Expand Up @@ -107,7 +107,7 @@ N> After changing defaults using UI tools (for example, Edit color or Edit opaci

## Customize programmatically at runtime

To update an existing annotation from code, modify its properties and call editAnnotation.
To update an existing annotation from code, modify its properties and call `editAnnotation`.

Example: bulk‑update matching annotations.

Expand Down
Loading