You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Library/javascript/HyperLinks.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ document.destroy();
171
171
172
172
## Modifying or updating existing hyperlinks
173
173
174
-
This example shows how to update hyperlink annotations in a PDF using Syncfusion’s JavaScript PDF Library. By accessing an annotation through `page.annotations.at()`, you can check whether it’s a link annotation and then update its URL or bounding region. This makes it easy to refresh outdated links or adjust navigation behavior whenever the document changes.
174
+
This example shows how to update hyperlink annotations in a PDF using Syncfusion’s JavaScript PDF Library. Link annotations retrieved from a pagecan have their URL or bounding region updated as needed. This makes it easy to refresh outdated links or adjust navigation behavior whenever the document changes.
175
175
176
176
{% tabs %}
177
177
{% highlight typescript tabtitle="TypeScript" %}
@@ -182,9 +182,11 @@ let document: PdfDocument = new PdfDocument(data);
182
182
// Access the first page
183
183
let page: PdfPage = document.getPage(0);
184
184
// Get the first annotation of the page
185
-
let annotation: PdfTextWebLinkAnnotation = page.annotations.at(0) as PdfTextWebLinkAnnotation;
185
+
let annotation: PdfAnnotation = page.annotations.at(0);
186
186
// Modified its properties
187
-
annotation.url = 'https://www.google.co.in/';
187
+
if (annotation instanceof PdfTextWebLinkAnnotation) {
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Library/javascript/Lists.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ document.destroy();
192
192
193
193
## Applying custom fonts to list items
194
194
195
-
This example shows how to apply custom fonts to list items in a PDF by using embedded fonts through `document.embedFont()`. The list supports Standard, TrueType, and CJK fonts, allowing accurate rendering of multilingual text. By selecting an embedded font and applying it to the list, you can control the style and appearance of list content with better consistency across platforms.
195
+
Custom fonts, including Standard, TrueType, and CJK types, can be embedded and applied to list items for consistent multilingual text rendering across platforms.
196
196
197
197
{% tabs %}
198
198
{% highlight typescript tabtitle="TypeScript" %}
@@ -296,7 +296,7 @@ This example shows how long lists automatically continue onto the next page when
let list1: PdfList = new PdfUnorderedList(new PdfListItemCollection(['PDF', 'XlsIO', 'DocIO', 'PPT', 'PDF', 'XlsIO', 'DocIO', 'PPT']));
312
312
let list2: PdfList = new PdfUnorderedList(new PdfListItemCollection(['A paragraph is a series of sentences that are organized and coherent, and are all related to a single topic. Almost every piece of writing you do that is longer than a few sentences should be organized into paragraphs.']), {suffix: '_'});
var list1 = new ej.pdf.PdfUnorderedList(new ej.pdf.PdfListItemCollection(['PDF', 'XlsIO', 'DocIO', 'PPT', 'PDF', 'XlsIO', 'DocIO', 'PPT']));
335
335
var list2 = new ej.pdf.PdfUnorderedList(new ej.pdf.PdfListItemCollection(['A paragraph is a series of sentences that are organized and coherent, and are all related to a single topic. Almost every piece of writing you do that is longer than a few sentences should be organized into paragraphs.']), {suffix: '_'});
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Library/javascript/Text.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -359,7 +359,7 @@ document.destroy();
359
359
360
360
## Drawing Right-To-Left text
361
361
362
-
This example shows how to draw right-to-left (RTL) text using a TrueType font that supports the target RTL script (for example, Hebrew or Arabic). Embed a TTF font that contains the needed glyphs and pass a `PdfStringFormat` when calling `drawString`.
362
+
This example demonstrates how to render right-to-left (RTL) text in a PDF document using a TrueType font that supports RTL scripts such as Hebrew or Arabic.
363
363
364
364
{% tabs %}
365
365
{% highlight typescript tabtitle="TypeScript" %}
@@ -411,7 +411,7 @@ document.destroy();
411
411
412
412
## Embedded font
413
413
414
-
This example shows how to embed fonts using `document.embedFont()` to ensure consistent text rendering across all platforms. The library supports embedding `PdfStandardFont`, `PdfCjkStandardFont`, and `PdfTrueTypeFont` for reliable Unicode text display. After embedding, the font can be applied through `embedded.getFont()`, allowing precise control over size and style. Additionally, using embedded fonts helps reduce overall PDF size, since the font dictionary is not duplicated for each usage—ensuring cleaner and more efficient output.
414
+
This example shows how to embed fonts using `PdfDocument.embedFont()`method to ensure consistent text rendering across all platforms. The library supports embedding `PdfStandardFont`, `PdfCjkStandardFont`, and `PdfTrueTypeFont` for reliable Unicode text display. After embedding, the font can be applied through `PdfFont.getFont()` method, allowing precise control over size and style. Additionally, using embedded fonts helps reduce overall PDF size, since the font dictionary is not duplicated for each usage—ensuring cleaner and more efficient output.
0 commit comments