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
34 changes: 22 additions & 12 deletions Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
<li><a href="/document-processing/pdf/pdf-viewer/angular/text-search">Text Search</a></li>
<li>Annotation
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/overview">Overview</a></li>
<li>Annotation Types
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotation-types/highlight-annotation">Highlight</a></li>
Expand All @@ -710,19 +711,28 @@
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotation-types/volume-annotation">Volume</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/text-markup-annotation">Text Markup Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/shape-annotation">Shape Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/stamp-annotation">Stamp Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/sticky-notes-annotation">Sticky Notes Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/measurement-annotation">Measurement Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/free-text-annotation">Free Text Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/line-angle-constraints">Line Angle Constraints</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/ink-annotation">Ink Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/import-export-annotation">Import and Export Annotations</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/comments">Comments</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/toolbar-customization/annotation-toolbar">Annotation Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/create-modify-annotation">Create and modify Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/customize-annotation">Customize Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/delete-annotation">Remove Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotations-undo-redo">Undo or Redo Annotation Changes</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotation-permission">Annotation Permission</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/signature-annotation">Handwritten Signature</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotation-event">Annotations Events</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotations-in-mobile-view">Annotations in Mobile view</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/line-angle-constraints">Line Angle Constraint</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/custom-data">Adding custom Data in annotations</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/flatten-annotation">Flatten Annotations into the PDF </a></li>
<li>Export and Import Annotations
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/export-import/export-annotation">Export Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/export-import/import-annotation">Import Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/export-import/export-import-events">Export and Import Events</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/comments">Comments and Replies</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotation-event">Annotation Events</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/custom-tools">Custom tools</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotations-in-mobile-view">Annotation in Mobile View</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/angular/annotation/annotations-api">APIs</a></li>
</ul>
</li>
<li>Redaction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: Annotations Events | Syncfusion
title: Annotations Events in Angular Pdfviewer Control | Syncfusion
description: Learn here all about annotation events in Syncfusion Angular PDF Viewer component of Syncfusion Essential JS 2 and more.
platform: document-processing
control: PDF Viewer
Expand All @@ -10,9 +10,7 @@ domainurl: ##DomainURL##

# PDF Viewer annotation events in Angular

The PDF Viewer control supports several annotation events that enable applications to respond to user interactions—adding, moving, resizing, selecting, and removing annotations. Examples in this article reference the resource URL shown in the code samples.

The annotation events supported by the PDF Viewer control are:
The PDF Viewer raises events for annotation and signature interactions (add, remove, move, resize, select, etc.). Handle these events to integrate custom workflows, telemetry, or UI updates. Code samples below demonstrate typical handlers — code blocks are preserved unchanged.

| Annotation events | Description |
|---------------------------------|--------------------------------------------------------------------|
Expand Down Expand Up @@ -1538,4 +1536,3 @@ export class AppComponent implements OnInit {
}
{% endhighlight %}
{% endtabs %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
layout: post
title: Annotations Permission in Angular PDF Viewer | Syncfusion
description: Learn here all about how to use annotation permissions in Syncfusion Angular PDF Viewer using programmatic APIs.
platform: document-processing
control: PDF Viewer
documentation: ug
domainurl: ##DomainURL##
---

# Annotation permissions in Angular

Use [annotationSettings](https://ej2.syncfusion.com/angular/documentation/api/pdfviewer/index-default#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

- `isLock`: Lock an annotation so it cannot be moved, resized, edited, or deleted.
- `skipPrint`: Exclude annotations from the print output when printing from the viewer.
- `skipDownload`: Exclude annotations from the exported/downloaded PDF.

Example: set default `annotationSettings` on the Angular `ejs-pdfviewer` component.

{% tabs %}
{% highlight ts tabtitle="Standalone" %}
import { Component } from '@angular/core';
import { PdfViewerModule, ToolbarService, AnnotationService } from '@syncfusion/ej2-angular-pdfviewer';

@Component({
selector: 'app-root',
template: `
<ejs-pdfviewer
id="pdfViewer"
[documentPath]="documentPath"
[resourceUrl]="resourceUrl"
[annotationSettings]="annotationSettings"
style="height:650px;display:block">
</ejs-pdfviewer>
`,
imports: [PdfViewerModule],
providers: [ToolbarService, AnnotationService]
})
export class AppComponent {
public documentPath: string = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib';

public annotationSettings: any = {
author: 'XYZ',
minHeight: 10,
minWidth: 10,
maxWidth: 100,
maxHeight: 100,
isLock: false,
skipPrint: false,
skipDownload: false,
allowedInteractions: ['Resize']
};
}
{% endhighlight %}
{% endtabs %}

## Individual permissions

- `isPrint`: Controls whether a specific annotation participates in printing. Set to `false` to exclude only that annotation from print output.
- `isLock`: Lock or unlock a specific annotation instance programmatically.

Example: set per-annotation defaults for text markup, shapes, and measurements as component bindings in Angular.

{% tabs %}
{% highlight ts tabtitle="Standalone" %}
import { Component } from '@angular/core';
import { PdfViewerModule, ToolbarService, AnnotationService } from '@syncfusion/ej2-angular-pdfviewer';

@Component({
selector: 'app-root',
template: `
<ejs-pdfviewer
id="pdfViewer"
[documentPath]="documentPath"
[resourceUrl]="resourceUrl"
[highlightSettings]="highlightSettings"
[strikethroughSettings]="strikethroughSettings"
[underlineSettings]="underlineSettings"
[squigglySettings]="squigglySettings"

[lineSettings]="lineSettings"
[arrowSettings]="arrowSettings"
[rectangleSettings]="rectangleSettings"
[circleSettings]="circleSettings"
[polygonSettings]="polygonSettings"

[distanceSettings]="distanceSettings"
[perimeterSettings]="perimeterSettings"
[areaSettings]="areaSettings"
[radiusSettings]="radiusSettings"
[volumeSettings]="volumeSettings"

[freeTextSettings]="freeTextSettings"
[inkAnnotationSettings]="inkAnnotationSettings"
[stampSettings]="stampSettings"
[stickyNotesSettings]="stickyNotesSettings"
style="height:650px;display:block">
</ejs-pdfviewer>
`,
imports: [PdfViewerModule],
providers: [ToolbarService, AnnotationService]
})
export class AppComponent {
public documentPath: string = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib';

public highlightSettings = { author: 'QA', subject: 'Review', color: '#ffff00', opacity: 0.6 };
public strikethroughSettings = { author: 'QA', subject: 'Remove', color: '#ff0000', opacity: 0.6 };
public underlineSettings = { author: 'Guest User', subject: 'Points to be remembered', color: '#00ffff', opacity: 0.9 };
public squigglySettings = { author: 'Guest User', subject: 'Corrections', color: '#00ff00', opacity: 0.9 };

public lineSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, isLock: false, isPrint: true };
public arrowSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, isLock: false, isPrint: true };
public rectangleSettings = { fillColor: '#ffffff00', strokeColor: '#222222', thickness: 1, opacity: 1, isLock: false, isPrint: true };
public circleSettings = { fillColor: '#ffffff00', strokeColor: '#222222', thickness: 1, opacity: 1, isLock: false, isPrint: true };
public polygonSettings = { fillColor: '#ffffff00', strokeColor: '#222222', thickness: 1, opacity: 1, isLock: false, isPrint: true };

public distanceSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, isLock: false, isPrint: true };
public perimeterSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, isLock: false, isPrint: true };
public areaSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, fillColor: '#ffffff00', isLock: false, isPrint: true };
public radiusSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, fillColor: '#ffffff00', isLock: false, isPrint: true };
public volumeSettings = { strokeColor: '#0066ff', thickness: 2, opacity: 0.8, fillColor: '#ffffff00', isLock: false, isPrint: true };

public freeTextSettings = { borderColor: '#222222', opacity: 1, isLock: false, isPrint: true };
public inkAnnotationSettings = { strokeColor: '#0000ff', thickness: 3, opacity: 0.8, isLock: false, isPrint: true };
public stampSettings = { opacity: 0.9, isLock: false, isPrint: true };
public stickyNotesSettings = { author: 'QA', subject: 'Review', opacity: 1, isLock: false, isPrint: true };
}
{% endhighlight %}
{% endtabs %}

Behavior notes
- isLock true: The annotation is locked; users cannot move, resize, or edit it through the UI until it is unlocked.
- skipPrint true: All annotations are omitted from the print output initiated from the viewer.
- skipDownload true: All annotations are omitted from the exported/downloaded PDF from the viewer.
- isPrint on an individual annotation: Use this when you only want to exclude a particular annotation from printing while leaving others printable.

[View Sample on GitHub](https://github.com/SyncfusionExamples/react-pdf-viewer-examples)

## See also

- [Annotation Overview](../overview)
- [Annotation Types](../annotation/annotation-types/area-annotation)
- [Annotation Toolbar](../toolbar-customization/annotation-toolbar)
- [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 in Mobile View](../annotation/annotations-in-mobile-view)
- [Annotation Events](../annotation/annotation-event)
- [Annotation API](../annotation/annotations-api)
Loading