Skip to content

Commit f3ac656

Browse files
1009405: TS UG Revamp I
1 parent 9b8a916 commit f3ac656

27 files changed

Lines changed: 252 additions & 254 deletions

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-event.md

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

11-
# Annotations Events in TypeScript PDF Viewer control
11+
# Annotations events in TypeScript PDF Viewer
1212

13-
The PDF Viewer component triggers various events based on user interactions and changes in the component's state. These events can be used to perform actions when a specific event occurs. This section describes the events available in the PDF Viewer component.
13+
This page documents annotation-related events for the JavaScript PDF Viewer and when to use them. The PDF Viewer triggers events for user interactions and component state changes; use these events to run handlers that respond to specific occurrences. The sections below list each event, the associated event-args type, and an example handler.
1414

1515
| Event | Description |
1616
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-permission.md

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

1111
# Annotation permissions
1212

13-
Use [annotationSettings](https://ej2.syncfusion.com/documentation/api/pdfviewer/index-default#annotationsettings) to control creation-time permissions and behavior of annotations in the PDF Viewer.
13+
Use [annotationSettings](https://ej2.syncfusion.com/javascript/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.
1414

1515
## Common permissions
1616

17-
- isLock: Locks the annotation so it cannot be moved, resized, edited, or deleted.
18-
- skipPrint: Excludes annotations from the print output when the document is printed from the viewer.
19-
- skipDownload: Excludes annotations from the exported/downloaded document.
17+
- `isLock`: Lock an annotation so it cannot be moved, resized, edited, or deleted.
18+
- `skipPrint`: Exclude annotations from the print output when printing from the viewer.
19+
- `skipDownload`: Exclude annotations from the exported/downloaded PDF.
20+
21+
Example: inject modules and create a viewer instance with default `annotationSettings`.
2022

2123
```ts
2224
import { PdfViewer, Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView,
@@ -48,8 +50,10 @@ viewer.appendTo("#pdfViewer");
4850

4951
## Individual permissions
5052

51-
- isPrint: Controls whether a specific annotation participates in printing. Set to false to prevent just that annotation from printing.
52-
- isLock: You can also lock/unlock a specific annotation instance programmatically.
53+
- `isPrint`: Controls whether a specific annotation participates in printing. Set to `false` to exclude only that annotation from print output.
54+
- `isLock`: Lock or unlock a specific annotation instance programmatically.
55+
56+
Example: create a viewer instance with per-annotation defaults for text markup, shapes, and measurements.
5357

5458
```ts
5559
import { PdfViewer, Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, Annotation, FormDesigner, FormFields } from '@syncfusion/ej2-pdfviewer';

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/Squiggly-annotation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ You can add squiggly annotations in two ways:
2727
![Squiggly context](../annotation-images/squiggle-context.gif)
2828

2929
2. Using the annotation toolbar
30-
* Click the **Edit Annotation** button in the PDF Viewer toolbar to open the annotation toolbar.
31-
* Select **Squiggly** to enable squiggly mode.
32-
* Select text to add the squiggly annotation.
33-
* Alternatively, select text first and then click **Squiggly**.
30+
- Click the **Edit Annotation** button in the PDF Viewer toolbar to open the annotation toolbar.
31+
- Select **Squiggly** to enable squiggly mode.
32+
- Select text to add a squiggly annotation.
33+
- Alternatively, select text first and then click **Squiggly**.
3434

3535
![Squiggly toolbar](../annotation-images/squiggle-tool.gif)
3636

3737
N> When in pan mode, selecting a text markup annotation switches the PDF Viewer to text select mode.
3838

39-
### Enable Squiggly Mode
39+
### Enable squiggly mode
4040

41-
Enable/exit squiggly mode using the following code:
41+
Enable or exit squiggly mode using the following code:
4242

4343
```html
4444
<button id="squigglyMode">Squiggly</button>
@@ -83,7 +83,7 @@ document.getElementById('setNone')?.addEventListener('click', () => {
8383
{% endhighlight %}
8484
{% endtabs %}
8585

86-
### Add squiggly annotation programmatically
86+
### Add squiggly annotations programmatically
8787

8888
Add squiggly annotations programmatically using the [addAnnotation](https://ej2.syncfusion.com/documentation/api/pdfviewer/annotation#addannotation) method.
8989

@@ -127,11 +127,11 @@ document.getElementById('addSquiggly')?.addEventListener('click', () => {
127127
{% endhighlight %}
128128
{% endtabs %}
129129

130-
## Edit Squiggly Annotation
130+
## Edit Squiggly Annotations
131131

132-
### Edit Squiggly annotation in UI
132+
### Edit Squiggly annotations in UI
133133

134-
The color and opacity of the squiggly annotation can be edited using the Edit Color and Edit Opacity tools in the annotation toolbar.
134+
Use the viewer to select and delete squiggly annotations. Use the context menu or toolbar options as needed.
135135

136136
#### Edit color
137137
Use the color palette in the Edit Color tool to change the annotation color.

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/area-annotation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Area is a measurement annotation used to measure the surface of a closed region
1818

1919
### Add area annotation via UI
2020

21-
Use the annotation toolbar:
21+
Use the annotation toolbar to:
2222
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
2323
- Click the **Measurement Annotation** dropdown.
2424
- Choose **Area**, then draw the region on the page.
@@ -264,9 +264,9 @@ pdfviewer.appendTo('#PdfViewer');
264264

265265
## Set properties while adding Individual Annotation
266266

267-
Set properties for individual annotation before creating the control using `AreaSettings`.
267+
Set properties for individual annotations before creating the control using `AreaSettings`.
268268

269-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
269+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
270270

271271
Refer to the following code snippet to set the default Area settings.
272272

@@ -324,7 +324,7 @@ The scale ratio and unit of measurement can be modified using the scale ratio op
324324

325325
![CalibrateScaleRatio](../../images/calibrate_scaleratio.png)
326326

327-
The Units of measurements support for the measurement annotations in the PDF Viewer are
327+
Supported units of measurements support for the measurement annotations in the PDF Viewer are
328328

329329
* Inch
330330
* Millimeter

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/arrow-annotation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Arrow is a shape annotation used to point, direct attention, or indicate flow. C
1818

1919
### Add arrow annotation via UI
2020

21-
Use the annotation toolbar:
21+
Use the annotation toolbar to:
2222
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
23-
- Open the **Shape Annotation**** dropdown.
23+
- Open the **Shape Annotation** dropdown.
2424
- Choose **Arrow**, then draw on the page.
2525

2626
N> When in pan mode, selecting a shape annotation switches the viewer to text select mode.
@@ -247,9 +247,9 @@ pdfviewer.appendTo('#PdfViewer');
247247

248248
## Set properties while adding Individual Annotation
249249

250-
Set properties for individual annotation before creating the control using `ArrowSettings`.
250+
Set properties for individual annotations before creating the control using `ArrowSettings`.
251251

252-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
252+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
253253

254254
Refer to the following code snippet to set the default arrow settings.
255255

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/circle-annotation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Circle is a shape annotation used to highlight circular regions or draw emphasis
1818

1919
### Add circle annotation via UI
2020

21-
Use the annotation toolbar:
21+
Use the annotation toolbar to:
2222
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
2323
- Open the **Shape Annotation** dropdown.
2424
- Choose **Circle**, then draw on the page.
@@ -29,7 +29,7 @@ N> When in pan mode, selecting a shape annotation switches the viewer to text se
2929

3030
### Enable circle mode
3131

32-
The PDF Viewer library allows drawing Circle annotations programmatically after enabling Circle mode in button clicks.
32+
The PDF Viewer library allows drawing circle annotations programmatically after enabling circle mode via button clicks.
3333

3434
```html
3535
<button id="circleMode">Circle</button>
@@ -253,9 +253,9 @@ pdfviewer.appendTo('#PdfViewer');
253253

254254
## Set properties while adding Individual Annotation
255255

256-
Set properties for individual annotation before creating the control using `CircleSettings`.
256+
Set properties for individual annotations before creating the control using `CircleSettings`
257257

258-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
258+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
259259

260260
Refer to the following code snippet to set the default Circle settings.
261261

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/distance-annotation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Distance is a measurement annotation used to measure the length between two poin
1818

1919
### Add distance annotation via UI
2020

21-
Use the annotation toolbar:
21+
Use the annotation toolbar to:
2222
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
2323
- Open the **Measurement Annotation** dropdown.
2424
- Choose **Distance**, then draw on the page.
@@ -29,7 +29,7 @@ N> When in pan mode, selecting a measurement annotation switches the viewer to t
2929

3030
### Enable distance mode
3131

32-
The PDF Viewer component allows drawing Distance annotations programmatically after enabling Distance mode in button clicks.
32+
The PDF Viewer component allows drawing distance annotations programmatically after enabling distance mode via button clicks.
3333

3434
```html
3535
<button id="distanceMode">Distance</button>
@@ -137,7 +137,7 @@ You can select, move, and resize Distance annotations directly in the viewer:
137137
- Resize: drag the end handles to adjust its length.
138138
- Delete or access more options from the context menu.
139139

140-
#### Edit the properties of area annotations
140+
#### Edit the properties of distance annotations
141141

142142
The fill color, stroke color, thickness, and opacity can be edited using the Edit Color, Edit Stroke Color, Edit Thickness, and Edit Opacity tools in the annotation toolbar.
143143

@@ -249,9 +249,9 @@ pdfviewer.appendTo('#PdfViewer');
249249

250250
## Set properties while adding Individual Annotation
251251

252-
Set properties for individual annotation before creating the control using `DistanceSettings`.
252+
Set properties for individual annotations before creating the control using `DistanceSettings`.
253253

254-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
254+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
255255

256256
Refer to the following code snippet to set the default Distance settings.
257257

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/free-text-annotation.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Free Text is a text box annotation used to place formatted text anywhere on the
1818

1919
### Add Free Text annotation via UI
2020

21-
Use the annotation toolbar:
21+
Use the annotation toolbar to:
2222
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
2323
- Click the **Free Text Annotation** button to enable Free Text mode.
2424
- Click on the page to add text.
@@ -29,7 +29,7 @@ When in pan mode, selecting Free Text switches the viewer to text select mode.
2929

3030
### Switch to Free Text mode
3131

32-
The PDF Viewer component allows drawing Distance annotations programmatically after enabling Distance mode in button clicks.
32+
The PDF Viewer component allows drawing free text annotations programmatically after enabling Free Text mode via button clicks.
3333

3434
```html
3535
<button id="addFreeTextAnnotation">FreeText</button>
@@ -251,10 +251,6 @@ document.getElementById('changeContent')?.addEventListener('click', () => {
251251
{% endhighlight %}
252252
{% endtabs %}
253253

254-
255-
256-
257-
258254
## Default Free Text settings during initialization
259255

260256
Set default Free Text properties before creating the control using freeTextSettings.
@@ -286,9 +282,9 @@ pdfviewer.appendTo('#PdfViewer');
286282

287283
## Set properties while adding Individual Annotation
288284

289-
Set properties for individual annotation before creating the control using `FreeTextSettings`.
285+
Set properties for individual annotations before creating the control using `FreeTextSettings`.
290286

291-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
287+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
292288

293289
Refer to the following code snippet to set the default FreeText settings.
294290

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/highlight-annotation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ The PDF Viewer provides options to add, edit, and delete Highlight annotations o
1818

1919
### Add highlight annotation via UI
2020

21-
You can add highlights in two ways:
21+
Add highlights in two ways:
2222

2323
1. Using the context menu
2424
- Select text in the PDF document and right-click it.
2525
- Choose **Highlight** in the context menu.
2626

2727
![Alt text](../annotation-images/highlight-context.gif)
2828

29-
2. Using the annotation toolbar
29+
2. Using the annotation toolbar to:
3030
- Click the **Edit Annotation** button in the PDF Viewer toolbar to open the annotation toolbar.
3131
- Select **Highlight** to enable highlight mode.
32-
- Select text to add the highlight annotation. Alternatively, select text first and then click **Highlight**.
32+
- Select text to add the highlight annotation, or select text first and then click **Highlight**.
3333

3434
![Alt text](../annotation-images/highlight-tool.gif)
3535

3636
N> When pan mode is active and a text markup mode is entered, the PDF Viewer switches to text selection mode to enable selection.
3737

3838
### Enable Highlight Mode
3939

40-
The PDF Viewer component allows add highlight annotations programmatically after enabling Highlight mode in button clicks.
40+
The PDF Viewer component allows adding highlight annotations programmatically after enabling Highlight mode via button clicks.
4141

4242
```html
4343
<!--Element to set text markup annotation mode-->

Document-Processing/PDF/PDF-Viewer/javascript-es6/annotations/annotation-types/ink-annotation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ Ink is a freehand drawing annotation used to sketch, sign, or mark up content.
1818

1919
### Add ink annotation via UI
2020

21-
Use the annotation toolbar:
22-
- Click the Edit Annotation button in the PDF Viewer toolbar.
23-
- Click the Draw Ink button to enable ink mode.
21+
Use the annotation toolbar to:
22+
- Click the **Edit Annotation** button in the PDF Viewer toolbar.
23+
- Click the **Draw Ink** button to enable ink mode.
2424
- Draw on any page of the PDF document.
2525

2626
![Ink tool in the annotation toolbar](../../images/ink_tool.png)
2727

2828
### Enable ink mode
2929

30-
The PDF Viewer component allows add ink annotations programmatically after enabling ink mode in button clicks.
30+
The PDF Viewer component allows adding ink annotations programmatically after enabling ink mode via button clicks.
3131

3232
```html
3333
<button id="addInkAnnotation">Ink Annotation</button>
@@ -123,7 +123,7 @@ document.getElementById('addInkAnnotationProgram')?.addEventListener('click', fu
123123

124124
### Edit ink annotation in UI
125125

126-
You can select, move, and resize Ink annotations directly in the viewer:
126+
Select, move, and resize ink annotations directly in the viewer:
127127
- Select an Ink annotation to show its handles.
128128
- Move: drag inside the stroke to reposition it on the page.
129129
- Resize: drag the selector handles to adjust its bounds.
@@ -250,9 +250,9 @@ pdfviewer.appendTo('#PdfViewer');
250250

251251
## Set properties while adding Individual Annotation
252252

253-
Set properties for individual annotation before creating the control using `InkSettings`.
253+
Set properties for individual annotations before creating the control using `InkSettings`
254254

255-
> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
255+
N> After editing default color and opacity using the Edit Color and Edit Opacity tools, the values update to the selected settings.
256256

257257
Refer to the following code snippet to set the default Ink settings.
258258

0 commit comments

Comments
 (0)