Skip to content

Commit 4305d15

Browse files
committed
999358-hotfix: Resolved the all feedback.
1 parent 3c42044 commit 4305d15

17 files changed

+511
-1758
lines changed

Document-Processing/PDF/PDF-Library/javascript/Annotations.md

Lines changed: 63 additions & 994 deletions
Large diffs are not rendered by default.

Document-Processing/PDF/PDF-Library/javascript/Bookmarks.md

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ let page: PdfPage = document.addPage();
2424
// Get the bookmarks
2525
let bookmarks: PdfBookmarkBase = document.bookmarks;
2626
// Add a new bookmark to the PDF document
27-
let bookmark: PdfBookmark = bookmarks.add('Introduction');
28-
// Sets destination to the bookmark
29-
bookmark.destination = new PdfDestination(page, { x: 100, y: 200 });
27+
let bookmark: PdfBookmark = bookmarks.add('Introduction', 0, {
28+
destination: new PdfDestination(page, { x: 100, y: 100 }, { zoom: 1 }),
29+
namedDestination: new PdfNamedDestination('First', new PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
30+
color: { r: 0, g: 0, b: 255 },
31+
textStyle: PdfTextStyle.bold});
3032
// Save the document
3133
document.save('output.pdf');
3234
// Close the document
@@ -42,9 +44,11 @@ var page = document.addPage();
4244
// Get the bookmarks
4345
var bookmarks = document.bookmarks;
4446
// Add a new bookmark to the PDF document
45-
var bookmark = bookmarks.add('Introduction');
46-
// Set destination to the bookmark
47-
bookmark.destination = new ej.pdf.PdfDestination(page, { x: 100, y: 200 });
47+
var bookmark = bookmarks.add('Introduction', 0, {
48+
destination: new ej.pdf.PdfDestination(page, { x: 100, y: 100 }, { zoom: 1 }),
49+
namedDestination: new ej.pdf.PdfNamedDestination('First', new ej.pdf.PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
50+
color: { r: 0, g: 0, b: 255 },
51+
textStyle: ej.pdf.PdfTextStyle.bold});
4852
// Save the document
4953
document.save('output.pdf');
5054
// Close the document
@@ -97,9 +101,70 @@ document.destroy();
97101
{% endhighlight %}
98102
{% endtabs %}
99103

104+
## Nested Bookmark
105+
106+
This example demonstrates how to create hierarchical (parent-child) bookmarks in a PDF using the PdfBookmark class. This feature allows organizing content with nested bookmark structures for easier navigation.
107+
108+
{% tabs %}
109+
{% highlight typescript tabtitle="TypeScript" %}
110+
import {PdfDocument, PdfPage, PdfBookmark, PdfBookmarkBase, PdfTextStyle, PdfNamedDestination, PdfDestination} from '@syncfusion/ej2-pdf';
111+
112+
// Create a new PDF document
113+
let document: PdfDocument = new PdfDocument();
114+
// Add a page
115+
let page: PdfPage = document.addPage();
116+
// Get the bookmarks
117+
let bookmarks: PdfBookmarkBase = document.bookmarks;
118+
// Add a new bookmark to the PDF document
119+
let bookmark: PdfBookmark = bookmarks.add('Introduction', 0, {
120+
destination: new PdfDestination(page, { x: 100, y: 100 }, { zoom: 1 }),
121+
namedDestination: new PdfNamedDestination('First', new PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
122+
color: { r: 0, g: 0, b: 255 },
123+
textStyle: PdfTextStyle.bold});
124+
// Add a child bookmark to the PDF document
125+
let childbookmark: PdfBookmark = bookmark.add('FirstChild', 0, {
126+
destination: new PdfDestination(page, { x: 100, y: 150 }, { zoom: 1 }),
127+
namedDestination: new PdfNamedDestination('Second', new PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
128+
color: { r: 0, g: 0, b: 255 },
129+
textStyle: PdfTextStyle.bold});
130+
// Save the document
131+
document.save('output.pdf');
132+
// Close the document
133+
document.destroy();
134+
135+
{% endhighlight %}
136+
{% highlight javascript tabtitle="JavaScript" %}
137+
138+
// Create a new PDF document
139+
var document= new ej.pdf.PdfDocument();
140+
// Add a page
141+
var page= document.addPage();
142+
// Get the bookmarks
143+
var bookmarks = document.bookmarks;
144+
// Add a new bookmark to the PDF document
145+
var bookmark = bookmarks.add('Introduction', 0, {
146+
destination: new ej.pdf.PdfDestination(page, { x: 100, y: 100 }, { zoom: 1 }),
147+
namedDestination: new ej.pdf.PdfNamedDestination('First', new ej.pdf.PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
148+
color: { r: 0, g: 0, b: 255 },
149+
textStyle: ej.pdf.PdfTextStyle.bold});
150+
// Add a child bookmark to the PDF document
151+
var childbookmark = bookmark.add('FirstChild', 0, {
152+
destination: new ej.pdf.PdfDestination(page, { x: 100, y: 150 }, { zoom: 1 }),
153+
namedDestination: new ej.pdf.PdfNamedDestination('Second', new ej.pdf.PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })),
154+
color: { r: 0, g: 0, b: 255 },
155+
textStyle: ej.pdf.PdfTextStyle.bold});
156+
// Save the document
157+
document.save('output.pdf');
158+
// Close the document
159+
document.destroy();
160+
161+
{% endhighlight %}
162+
{% endtabs %}
163+
100164
## Removing bookmarks from an existing PDF
101165

102166
This example demonstrates how to remove bookmarks from an existing PDF document using the `PdfBookmark` class.
167+
103168
{% tabs %}
104169
{% highlight typescript tabtitle="TypeScript" %}
105170
import {PdfDocument, PdfPage, PdfBookmarkBase} from '@syncfusion/ej2-pdf';
@@ -186,7 +251,7 @@ let document: PdfDocument = new PdfDocument(data);
186251
let bookmarks: PdfBookmarkBase = document.bookmarks;
187252
// Remove all the bookmark from the collection.
188253
bookmarks.clear();
189-
// // Get the count after removal of all bookmarks
254+
// Get the count after removal of all bookmarks
190255
let count: number = bookmarks.count;
191256
// Save the document
192257
document.save('output.pdf');
@@ -202,7 +267,7 @@ var document = new ej.pdf.PdfDocument(data);
202267
var bookmarks = document.bookmarks;
203268
// Remove all the bookmarks from the collection
204269
bookmarks.clear();
205-
// // Get the count after removal of all bookmarks
270+
// Get the count after removal of all bookmarks
206271
var count = bookmarks.count;
207272
// Save the document
208273
document.save('output.pdf');

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ documentation: ug
88
keywords: angular create pdf, angular generate pdf, angular pdf library, ej2 pdf angular, JavaScript
99
---
1010

11-
# Create or generate PDF file in Angular application
11+
# Create or Generate PDF file in Angular application
1212

1313
The Syncfusion<sup>&reg;</sup> JavaScript PDF library is used to create, read, and edit PDF documents. This library also offers functionality to merge, split, stamp, fill forms, and secure PDF files.
1414

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Syncfusion<sup>&reg;</sup> JavaScript PDF library is used to create, read, a
1414

1515
This guide explains how to integrate the JavaScript PDF library into an ASP.NET Core MVC application.
1616

17-
## Integrate PDF library into an ASP.NET MVC Core application
17+
## Integrate PDF library into an ASP.NET Core MVC application
1818

1919
Step 1: Start Visual Studio and select **Create a new project**.
2020
Step 2: Create a new ASP.NET MVC Web Application project.

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ Step 2: The JS 2 global scripts and styles are hosted on the CDN in the followin
2020

2121
**Syntax:**
2222
> Script: `https://cdn.syncfusion.com/ej2/{Version}/dist/{PACKAGE_NAME}.min.js`
23-
>
24-
> Styles: `https://cdn.syncfusion.com/ej2/{Version}/{PACKAGE_NAME}/styles/material.css`
2523
2624
**Example:**
2725
> Script: [`https://cdn.syncfusion.com/ej2/31.2.15/dist/ej2.min.js`](https://cdn.syncfusion.com/ej2/31.2.15/dist/ej2.min.js)
28-
>
29-
> Styles: [`https://cdn.syncfusion.com/ej2/31.2.15/ej2-base/styles/material.css`](https://cdn.syncfusion.com/ej2/31.2.15/ej2-base/styles/material.css)
3026
3127
Step 3: Create a HTML page (index.html) in `my-app` location and add the CDN link references.
3228

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ All Syncfusion JS 2 packages are published in `npmjs.com` registry.
4747
```bash
4848
npm install @syncfusion/ej2-pdf --save
4949
```
50+
or
51+
```bash
52+
yarn add @syncfusion/ej2-pdf
53+
```
54+
5055
N> For image/data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
5156
* Copy the contents of the openjpeg folder from ./node_modules/@syncfusion/ej2-pdf-data-extract/dist to the public directory using the command:
5257
```bash

Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ document.destroy();
306306
{% endhighlight %}
307307
{% endtabs %}
308308

309-
## Create and certify a digital signature field
309+
## Certified Signature
310310

311311
This example demonstrates how to add a signature field to a PDF, create a digital signature using certificate data and a password, certify the document, and save the signed PDF document.
312312

@@ -354,7 +354,7 @@ document.destroy();
354354
{% endhighlight %}
355355
{% endtabs %}
356356

357-
## Create and lock a digitally signed PDF
357+
## Lock Signature
358358

359359
This example shows how to add a signature field to a PDF, create a digital signature using certificate data and a password, lock the document after signing, and save the result in PDF library.
360360

@@ -488,8 +488,9 @@ var signature = ej.pdf.PdfSignature.create(
488488
);
489489
// Bind the certifying signature to the first signature field
490490
field.setSignature(signature);
491-
//// Add both signature fields to the document form
491+
// Add the first signature field
492492
document.form.add(field);
493+
// Add the second signature field
493494
document.form.add(field2);
494495
// Save the current state to a Uint8Array
495496
var data = document.save();

0 commit comments

Comments
 (0)