diff --git a/Document-Processing/Excel/Excel-Library/NET/FAQ.md b/Document-Processing/Excel/Excel-Library/NET/FAQ.md index 20a962e57b..8d45e0eed4 100644 --- a/Document-Processing/Excel/Excel-Library/NET/FAQ.md +++ b/Document-Processing/Excel/Excel-Library/NET/FAQ.md @@ -108,7 +108,7 @@ The frequently asked questions in Essential® XlsIO are listed bel * [Does XlsIO support the multiline header footer support?](faqs/does-xlsio-support-the-multiline-header-footer-support) * [How to add Barcode in Excel document using C#?](faqs/how-to-add-barcode-in-excel-document) * [How to delete hyperlinks from a worksheet without affecting the cell styles using C#?](faqs/how-to-delete-hyperlinks-from-worksheet-without-affecting-the-cell-styles) -* [How to avoid processing unnecessary worksheets when opening an Excel document using C#?](faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document-using-C#) +* [How to avoid processing unnecessary worksheets when opening an Excel document using C#?](faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document) * [How to run macros in Excel document?](faqs/how-to-run-macros-in-Excel-document) * [Does XlsIO support editing an Excel document that is already open in Microsoft Excel?](faqs/does-xlsio-support-editing-an-Excel-document-that-is-already-open-in-Microsoft-Excel) * [How to compute the size of the Excel file?](faqs/how-to-compute-the-size-of-the-Excel-file) diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-or-format-a-header-footer.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-or-format-a-header-footer.md index 8c8c174441..50254ed673 100644 --- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-or-format-a-header-footer.md +++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-or-format-a-header-footer.md @@ -64,4 +64,4 @@ N> Go to “ View -> Page Layout” option to view the header and footer in Micr * [What are page setup settings?](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-excel-worksheet#page-setup-settings) * [How to set a line break inside a cell?](https://help.syncfusion.com/document-processing/excel/excel-library/net/faqs/how-to-set-a-line-break-inside-a-cell) * [How to set print titles?](https://help.syncfusion.com/document-processing/excel/excel-library/net/faqs/how-to-set-print-titles) -* [How to format text within a cell?](https://help.syncfusion.com/document-processing/excel/excel-library/net/faqs/how-to-format-text-within-a-cel) +* [How to format text within a cell?](https://help.syncfusion.com/document-processing/excel/excel-library/net/faqs/how-to-format-text-within-a-cell) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md index 312c6ecaf1..3b12d10392 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md @@ -293,7 +293,7 @@ N> Users need to [refresh the view](https://help.syncfusion.com/document-process ## Clear formatting -SfSpreadsheet provides support to clear the contents of a cell along with its formatting or by specifying the required clear options using [ExcelClearOptions](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelClearOptions.html) enum which specifies the possible directions to clear the cell formats, content, comments,conditional format,data validation or clear all of them. +SfSpreadsheet provides support to clear the contents of a cell along with its formatting or by specifying the required clear options using [ExcelClearOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.ExcelClearOptions.html) enum which specifies the possible directions to clear the cell formats, content, comments,conditional format,data validation or clear all of them. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Overview.md b/Document-Processing/Excel/Spreadsheet/WPF/Overview.md index 172723400b..c38f9e3626 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Overview.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Overview.md @@ -17,11 +17,11 @@ The [Syncfusion® WPF Spreadsheet (SfSpreadsheet)](https://www.syncfu ## Key Features -* **[Ribbon](Ribbon-Customization)** – Ribbon integrated with organically enhanced UI experience. +* **[Ribbon](ribbon-customization)** – Ribbon integrated with organically enhanced UI experience. -* **[Editing](Editing)** **and** **[Selection](Selection)**- Interactive support for editing and cell selection in workbook. +* **[Editing](editing)** **and** **[Selection](selection)**- Interactive support for editing and cell selection in workbook. -* **[Formulas](Formulas)** - Provides support for 400+ most widely used formulas which any business user needs and allows you to add, remove and edit the formulas like in excel. +* **[Formulas](formulas)** - Provides support for 400+ most widely used formulas which any business user needs and allows you to add, remove and edit the formulas like in excel. * **[Name Manager](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formulas#named-ranges)** – Supports the name ranges in the formulas. By using the name ranges, you can specify the name of the cell range, and then you can use it in the formula more easily without hassling of remembering cell locations. @@ -31,7 +31,7 @@ The [Syncfusion® WPF Spreadsheet (SfSpreadsheet)](https://www.syncfu * **[Merge Cells](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formatting#merge-cells)** - Merge two or more adjacent cells into a single cell and display the contents of one cell in the merged cell. -* **[Conditional Formatting](Conditional-Formatting)**- Provides support for excel compatible conditional formatting and allows you to apply formats to a cell or range of cells depending on the value of cells or formula that meet specific criteria. Also provides support to define and import the conditional formatting. rules such as Data Bars, Icon Sets and Color Scales options which are used to visualize the data. +* **[Conditional Formatting](conditional-formatting)**- Provides support for excel compatible conditional formatting and allows you to apply formats to a cell or range of cells depending on the value of cells or formula that meet specific criteria. Also provides support to define and import the conditional formatting. rules such as Data Bars, Icon Sets and Color Scales options which are used to visualize the data. * **[Cell Comments](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/interactive-features#cell-comments)**- Supports comments that provide additional information about a cell such as what the value represents. And it would be useful if you want the end users to understand the data in the cells more deeply. @@ -47,24 +47,24 @@ The [Syncfusion® WPF Spreadsheet (SfSpreadsheet)](https://www.syncfu * **[Resizing and Hiding](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/rows-and-columns#hide-rows-and-columns)** – Provides interactive support to resize or hide/unhide the rows and columns. -* **[Charts, Pictures and Textboxes](Shapes)** - Provides support to import Charts, Pictures and Textboxes. +* **[Charts, Pictures and Textboxes](shapes)** - Provides support to import Charts, Pictures and Textboxes. * **[Sparklines](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/shapes#sparklines)** – Provides support to import Sparklines. * **[Outlines](Outline)** - Provides support to group or ungroup rows and columns. -* **[Workbook and Worksheet Protection](Worksheet-Management)**- Provides support to protect the worksheet and also supports to lock-down the structure and window of workbook, which enables you to prevent workbook from any structural change or from any change in size. +* **[Workbook and Worksheet Protection](worksheet-management)**- Provides support to protect the worksheet and also supports to lock-down the structure and window of workbook, which enables you to prevent workbook from any structural change or from any change in size. -* **[Conversion](Conversion)** – Provides support to export the workbook to PDF, HTML, Image and CSV. +* **[Conversion](conversion)** – Provides support to export the workbook to PDF, HTML, Image and CSV. * **[Zooming](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/worksheet-management#zooming)** – Provides support to zoom in and zoom out of the worksheet view. -* **[Localization](Localization)** - Provides support to localize all the static text in a Ribbon and all dialogs to any desired language. +* **[Localization](localization)** - Provides support to localize all the static text in a Ribbon and all dialogs to any desired language. * **Supported file types** - Ability to import the different types of excel which are XLS, XLSX, XLSM, XLT, XLTX, CSV(Comma delimited) respectively. ## Related Link -- [Getting Started](Getting-Started) +- [Getting Started](getting-started) - [API Reference](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.html) - [Online Demos](https://github.com/syncfusion/spreadsheet-editor-sdk-wpf-demos) - [GitHub Samples](https://github.com/SyncfusionExamples/create-view-edit-excel-files-using-wpf-spreadsheet) diff --git a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-C-Sharp-VB-NET.md b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-C-Sharp-VB-NET.md index 9bc1bd0042..9ab9bfb9d5 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-C-Sharp-VB-NET.md +++ b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-C-Sharp-VB-NET.md @@ -1,5 +1,6 @@ --- title: Create or Generate PDF file in C# and VB.NET | Syncfusion +canonical_url: "https://www.syncfusion.com/document-sdk/net-pdf-library" description: Learn how to create or generate a PDF file in C# and VB.NET with elements like text, image and table using Syncfusion .NET PDF library without Adobe. platform: document-processing control: PDF @@ -1021,4 +1022,6 @@ finalDoc.Close(True) {% endtabs %} -N> You can also explore our [.NET PDF library](https://document.syncfusion.com/demos/pdf/default#/tailwind) demo that shows how to create and modify PDF files from C# with just five lines of code. \ No newline at end of file +N> You can also explore our [.NET PDF library](https://document.syncfusion.com/demos/pdf/default#/tailwind) demo that shows how to create and modify PDF files from C# with just five lines of code. + +N> Looking for the full .NET PDF Library overview, features, pricing, and documentation? Visit the [.NET PDF Library](https://www.syncfusion.com/document-sdk/net-pdf-library) page. diff --git a/Document-Processing/PDF/PDF-Library/NET/Overview.md b/Document-Processing/PDF/PDF-Library/NET/Overview.md index b815c7a8eb..6aa2338858 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Overview.md +++ b/Document-Processing/PDF/PDF-Library/NET/Overview.md @@ -1,5 +1,6 @@ --- title: Create, read, edit, convert PDF files in .NET | Syncfusion +canonical_url: "https://www.syncfusion.com/document-sdk/net-pdf-library" description: Essential PDF is a .NET PDF library to convert PDF files in Windows Forms, WPF, UWP, ASP.NET Core, ASP.NET MVC, Xamarin, Flutter applications platform: document-processing control: PDF @@ -17,7 +18,7 @@ The following list shows the key features available in the Essential®® 1. Starting with v20.1.0.x, if you reference Syncfusion® HTML converter or OCR processor assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components. + +N> Looking for the full .NET PDF Library overview, features, pricing, and documentation? Visit the [.NET PDF Library](https://www.syncfusion.com/document-sdk/net-pdf-library) page. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Annotations.md b/Document-Processing/PDF/PDF-Library/javascript/Annotations.md index 45a7f391f9..34fcb676d3 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Annotations.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Annotations.md @@ -1,13 +1,13 @@ --- -title: Annotation in JavaScript PDF library | Syncfusion -description: This section explains how to create, modify or remove different type of interactive Annotation by using JavaScript PDF library +title: Annotation in JavaScript PDF Library | Syncfusion +description: This section explains how to create, modify or remove different type of interactive Annotation by using JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Annotation in JavaScript PDF library +# Annotation in JavaScript PDF Library -The PDF library provides support for interactive annotations. You can add, delete and modify the annotation from the PDF documents. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides support for interactive annotations. You can add, delete and modify the annotation from the PDF documents. ## Adding annotations to a PDF document diff --git a/Document-Processing/PDF/PDF-Library/javascript/Bookmarks.md b/Document-Processing/PDF/PDF-Library/javascript/Bookmarks.md index 613af580a5..ec8110f968 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Bookmarks.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Bookmarks.md @@ -1,13 +1,13 @@ --- -title: Bookmarks in JavaScript PDF library | Syncfusion -description: This section explains how to add, modify and remove bookmarks in the PDF document by using JavaScript PDF library +title: Bookmarks in JavaScript PDF Library | Syncfusion +description: This section explains how to add, modify and remove bookmarks in the PDF document by using JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Bookmarks in JavaScript PDF library +# Bookmarks in JavaScript PDF Library -Syncfusion® PDF provides support to insert, remove, and modify the bookmarks in the PDF Document. +[JavaScript PDF](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides support to insert, remove, and modify the bookmarks in the PDF Document. ## Adding bookmarks to a PDF diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md index e0ae1091cf..96de970ec8 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF file in Angular | Syncfusion -description: Learn how to create a PDF file in Angular with easy steps using Syncfusion JavaScript PDF library without depending on Adobe +description: Learn how to create a PDF file in Angular with easy steps using JavaScript PDF Library without depending on Adobe platform: document-processing control: PDF documentation: ug @@ -10,13 +10,13 @@ keywords: angular create pdf, angular generate pdf, angular pdf library, ej2 pdf # Create or Generate PDF file in Angular application -The Syncfusion® [JavaScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the JavaScript PDF library into an Angular application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an Angular application. -## Integrate the PDF library into an Angular application +## Setup Angular Environment -Step1: You can use the [Angular CLI](https://github.com/angular/angular-cli) to setup your Angular applications. +You can use the [Angular CLI](https://github.com/angular/angular-cli) to setup your Angular applications. To install the latest Angular CLI globally use the following command. ```bash @@ -24,13 +24,21 @@ npm install -g @angular/cli ``` N> To install a specific Angular CLI version, use: **npm install --save @angular/cli@12.0.2** -Step2: Create a new Angular application using the Angular CLI command as follows. + +## Create an Angular Application + +Start a new Angular application using the Angular CLI command as follows. ```bash ng new my-app cd my-app ``` -Step3: All Syncfusion® JS 2 packages are published in `npmjs.com` registry.To install the PDF component, use the following command. + +## Installing JavaScript PDF package + +All Syncfusion® JS 2 packages are published in `npmjs.com` registry. + +* To install PDF component, use the following command. ```bash npm install @syncfusion/ej2-pdf --save @@ -42,7 +50,9 @@ N> For image and data extraction features, you need to install the `@syncfusion/ (Angular’s development server already handles this; configure production servers manually.) * This setup is not required for **basic PDF creation**. -Step4: Add a simple button to `app.component.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. +## Create a PDF document + +* Add a simple button to `app.component.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. {% tabs %} {% highlight html tabtitle="app.component.html" %} @@ -89,7 +99,10 @@ document.getElementById('normalButton').onclick = (): void => { }; {% endhighlight %} {% endtabs %} -Step5: Use the following command to run the application in browser. + +## Run the application + +Use the following command to run the application in browser. ```bash ng serve --open @@ -97,8 +110,4 @@ ng serve --open By executing the program, you will get the PDF document as follows. -![Output PDF document](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/angular/#/tailwind3/pdf/default) in Angular. \ No newline at end of file +![Output PDF document](Getting_started_images/Output.png) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-core.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-core.md index 094eb3ad7d..211af02fc7 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-core.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-core.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF in ASP.NET Core | Syncfusion -description: Learn how to create or generate a PDF file in ASP.NET Core applications with easy steps using Syncfusion JavaScript PDF library without depending on Adobe. +description: Learn how to create or generate a PDF file in ASP.NET Core applications with easy steps using JavaScript PDF Library without depending on Adobe. platform: document-processing control: PDF documentation: ug @@ -10,11 +10,11 @@ keywords: .net core create pdf, edit pdf, merge, pdf form, fill form, digital si # Create or Generate PDF in ASP.NET Core -The Syncfusion® [JavaScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the JavaScript PDF library into an ASP.NET Core application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an ASP.NET Core application. -## Integrate the PDF library into an ASP.NET Core application +## Integrate the PDF Library into an ASP.NET Core application Step 1: Start Visual Studio and select **Create a new project**. Step 2: In the **Create a new project** dialog, select **ASP.NET Core Web App**. @@ -26,22 +26,16 @@ Step 4: In the **Additional information** dialog, select a .NET LTS version (for Step 5: **Add script reference**: Add the required scripts using the CDN inside the `` of `~/Views/Shared/_Layout.cshtml` as follows: -**Syntax:** -> Script: `https://cdn.syncfusion.com/ej2/{Version}/dist/{PACKAGE_NAME}.min.js` - -**Example:** -> Script: [`https://cdn.syncfusion.com/ej2/33.2.12/dist/ej2.min.js`](https://cdn.syncfusion.com/ej2/33.2.12/dist/ej2.min.js) - {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} - - + + {% endhighlight %} {% endtabs %} -N> Check out the following topics for including script references in an ASP.NET Core application to enable PDF creation using the Syncfusion® JavaScript PDF library: +N> Check out the following topics for including script references in an ASP.NET Core application to enable PDF creation using the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library): * [CDN](https://ej2.syncfusion.com/aspnetcore/documentation/common/adding-script-references#cdn-reference) * [NPM Package](https://ej2.syncfusion.com/aspnetcore/documentation/common/adding-script-references#node-package-manager-npm) * [CRG](https://ej2.syncfusion.com/aspnetcore/documentation/common/custom-resource-generator) @@ -82,14 +76,10 @@ Step 6: **Create a PDF document**: Add the script in `~/Views/Home/Index.cshtml` {% endhighlight %} {% endtabs %} -Step 7: **Build the project**: Click on Build > Build Solution or press Ctrl + Shift + B to build the project. +step 7: **Build the project**: Click on Build > Build Solution or press Ctrl + Shift + B to build the project. Step 8: **Run the project**: Click the Start button (green arrow) or press F5 to run the app. By executing the program, you will generate the following PDF document. -![ASP.NET Core PDF output](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/default#/tailwind3) in ASP.NET Core. \ No newline at end of file +![ASP.NET Core PDF output](Getting_started_images/Output.png) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md index df3f5da9e2..5f5c117470 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF file in ASP.NET Core MVC | Syncfusion -description: Learn how to create a PDF file in ASP.NET Core MVC with easy steps using Syncfusion JavaScript PDF library without depending on Adobe +description: Learn how to create a PDF file in ASP.NET Core MVC with easy steps using JavaScript PDF Library without depending on Adobe platform: document-processing control: PDF documentation: ug @@ -10,11 +10,11 @@ keywords: MVC, javascript, pdf # Create or Generate PDF file in ASP.NET Core MVC -The Syncfusion® [JavaScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the JavaScript PDF library into an ASP.NET Core MVC application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an ASP.NET Core MVC application. -## Integrate PDF library into an ASP.NET Core MVC application +## Integrate PDF Library into an ASP.NET Core MVC application Step 1: Start Visual Studio and select **Create a new project**. Step 2: Create a new ASP.NET MVC Web Application project. @@ -30,13 +30,13 @@ Step 5: **Add script reference**: Add the required scripts using the CDN inside {% highlight cshtml tabtitle="~/_Layout.cshtml" %} ... - - + + {% endhighlight %} {% endtabs %} -N> Check out the following topics for including script references in an ASP.NET MVC application to enable PDF creation using the Syncfusion® JavaScript PDF library: +N> Check out the following topics for including script references in an ASP.NET MVC application to enable PDF creation using the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library): * [CDN](https://ej2.syncfusion.com/aspnetmvc/documentation/common/adding-script-references) * [NPM Package](https://ej2.syncfusion.com/aspnetmvc/documentation/common/adding-script-references#node-package-manager-npm) * [CRG](https://ej2.syncfusion.com/aspnetmvc/documentation/common/custom-resource-generator) @@ -83,4 +83,4 @@ Step 8: **Run the project**: Click the Start button (green arrow) or press F5 to When you run the application and click the button, it generates the following PDF document. -![ASP.NET Core MVC PDF output](Getting_started_images/Output.png) \ No newline at end of file +![ASP.NET Core MVC PDF output](Getting_started_images/Output.png) diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md index c702502ee8..1880065426 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md @@ -1,7 +1,8 @@ --- layout: post title: Create or Generate PDF file in JavaScript | Syncfusion -description: Learn how to create a PDF file in JavaScript with easy steps using Syncfusion JavaScript PDF library without depending on Adobe +canonical_url: https://www.syncfusion.com/document-sdk/javascript-pdf-library +description: Learn how to create a PDF file in JavaScript with easy steps using JavaScript PDF Library without depending on Adobe platform: document-processing control: PDF documentation: ug @@ -10,7 +11,7 @@ keywords: javascript, pdf, script # Create or Generate PDF file in JavaScript -Syncfusion® JS 2 (global script) is an ES5-formatted [JavaScript PDF library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) that works directly in modern web browsers. +Syncfusion® JS 2 (global script) is an ES5-formatted [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) that works directly in modern web browsers. ## Component initialization with CDN links @@ -22,15 +23,15 @@ Step 2: The JS 2 global scripts and styles are hosted on the CDN in the followin > Script: `https://cdn.syncfusion.com/ej2/{Version}/dist/{PACKAGE_NAME}.min.js` **Example:** -> Script: [`https://cdn.syncfusion.com/ej2/33.2.12/dist/ej2.min.js`](https://cdn.syncfusion.com/ej2/33.2.12/dist/ej2.min.js) +> 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) Step 3: Create a HTML page (index.html) in `my-app` location and add the CDN link references. {% tabs %} {% highlight javascript tabtitle="index.html" %} - - + + {% endhighlight %} {% endtabs %} @@ -74,8 +75,4 @@ Step 4: **Create a PDF document**: Add the script in `index.html` by creating a By executing the program, you will get the PDF document as follows. -![Output PDF document](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/javascript/#/tailwind3/pdf/default.html) in JavaScript. +![Output PDF document](Getting_started_images/Output.png) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-node.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-node.md index 8452ce364d..d1cd2dae75 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-node.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-node.md @@ -1,7 +1,7 @@ --- layout: post -title: Create or Generate PDF file in Node | Syncfusion -description: Learn how to create a PDF file in Node.js server with easy steps using Syncfusion TypeScript PDF library without depending on Adobe +title: Create or Generate PDF file in Node.js | Syncfusion +description: Learn how to create a PDF file in Node.js server with easy steps using JavaScript PDF Library without depending on Adobe platform: document-processing control: PDF documentation: ug @@ -10,13 +10,15 @@ keywords: pdf, script, express, node # Create or Generate a PDF File in a Node.js Server Environment -The Syncfusion® [TypeScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the Syncfusion TypeScript PDF library into an application with **Node.js server environment**. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an application with **Node.js server environment**. -## Integrate the PDF library into a Node.js Server Environment +## Installing the JavaScript PDF Library package -Step1: All Syncfusion JS 2 packages are published in `npmjs.com` registry.To install the PDF library, use the following command. +All Syncfusion JS 2 packages are published in `npmjs.com` registry. + +* To install the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library), use the following command. ```bash npm install @syncfusion/ej2-pdf --save @@ -25,14 +27,18 @@ npm install @syncfusion/ej2-pdf --save N> For data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on. Image extraction and image‑based redaction features are optimized for browser environments where visual rendering is available. These features rely on browser technologies such as DOM APIs, Canvas, and client‑side rendering, and therefore are not supported in pure Node.js server environments. -Step2: The following list of dependencies are required to use the `TypeScript PDF library` component in your application. +## Dependencies + +The following list of dependencies are required to use the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) component in your application. ```bash |-- @syncfusion/ej2-compression |-- @syncfusion/ej2-base ``` -Step3: Add a simple button to `index.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. +## Create a Node.js Server Application to Generate a PDF Document + +* Add a simple button to `index.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. {% tabs %} {% highlight html tabtitle="index.html" %} @@ -135,6 +141,8 @@ app.listen(PORT, () => { {% endhighlight %} {% endtabs %} +* **Run the application** + Run the following command to start the Node.js server: ```bash @@ -145,6 +153,4 @@ This command starts the server and allows you to generate and download the PDF f By executing the program, you will get the PDF document as follows. -![Output PDF document](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. \ No newline at end of file +![Output PDF document](Getting_started_images/Output.png) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-react.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-react.md index 279b5fd6d0..3efb02bfcb 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-react.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-react.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF file in React | Syncfusion -description: Learn how to create a PDF file in React with easy steps using Syncfusion JavaScript PDF library without depending on Adobe +description: Learn how to create a PDF file in React with easy steps using JavaScript PDF Library without depending on Adobe control: PDF platform: document-processing documentation: ug @@ -10,15 +10,15 @@ keywords: javascript, pdf, script, react # Create or Generate PDF file in React -The Syncfusion® [JavaScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the JavaScript PDF library into a React application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into a React application. -## Installing Syncfusion® JavaScript PDF package +## Installing JavaScript PDF package All Syncfusion JS 2 packages are published in `npmjs.com` registry. -Step1: To install the PDF library, use the following command. +* To install the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library), use the following command. ```bash npm install @syncfusion/ej2-pdf --save @@ -29,10 +29,10 @@ N> For image and data extraction features, you need to install the `@syncfusion/ * Ensure your server serves .wasm files with the **Content-Type: application/wasm** MIME type. * This setup is not required for **basic PDF creation**. -Step2: Add the script in `App.jsx` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document. +**Create a PDF document**: Add the script in `App.jsx` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document. {% tabs %} -{% highlight html tabtitle="App.jsx" %} +{% highlight html tabtitle="~/App.jsx" %} import React from 'react'; export default function App() { @@ -66,7 +66,9 @@ export default function App() { {% endhighlight %} {% endtabs %} -Step3: Now run the `npm run dev` command in the console to start the development server. This command compiles your code and serves the application locally, opening it in the browser. +## Run the application + +Now run the `npm run dev` command in the console to start the development server. This command compiles your code and serves the application locally, opening it in the browser. ``` npm run dev @@ -74,7 +76,3 @@ npm run dev By executing the program, you will get the PDF document as follows. ![Output PDF document](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/react/#/tailwind3/pdf/default) in React. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-typescript.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-typescript.md index cb2789431b..33d7706a6d 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-typescript.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-typescript.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF file in TypeScript | Syncfusion -description: Learn how to create a PDF file in TypeScript with easy steps using Syncfusion TypeScript PDF library without depending on Adobe +description: Learn how to create a PDF file in TypeScript with easy steps using JavaScript PDF Library without depending on Adobe platform: document-processing control: PDF documentation: ug @@ -10,15 +10,15 @@ keywords: pdf, script, typescript # Create or Generate PDF file in TypeScript -The Syncfusion® [TypeScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the TypeScript PDF library into an TypeScript application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an TypeScript application. ## Installing the Syncfusion TypeScript PDF package All Syncfusion JS 2 packages are published in `npmjs.com` registry. -Step1: To install the PDF library, use the following command. +* To install the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library), use the following command. ```bash npm install @syncfusion/ej2-pdf --save @@ -26,14 +26,18 @@ npm install @syncfusion/ej2-pdf --save N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on. Ensure that your application includes an `ej2-pdf-lib` folder within a publicly accessible static directory (such as wwwroot, public, or dist). This folder must contain the required `.js` and `.wasm` files needed for image and data extraction. This setup is not required for **basic PDF creation**. -Step2: The following list of dependencies are required to use the `TypeScript PDF library` component in your application. +## Dependencies + +The following list of dependencies are required to use the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) component in your application. ```bash |-- @syncfusion/ej2-compression |-- @syncfusion/ej2-base ``` -Step3: Add a simple button to `index.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. +## Create a PDF document using TypeScript + +* Add a simple button to `index.html` and attach a click handler that uses the TypeScript PDF API to create a new PDF document. {% tabs %} {% highlight html tabtitle="index.html" %} @@ -85,7 +89,9 @@ document.getElementById('normalButton').onclick = (): void => { {% endhighlight %} {% endtabs %} -Step4: The quickstart project is configured to compile and run in the browser. Use the following command to start the application: +* **Run the application** + +The quickstart project is configured to compile and run in the browser. Use the following command to start the application: ```bash npm start @@ -93,8 +99,4 @@ npm start By executing the program, you will get the PDF document as follows. -![Output PDF document](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/javascript-es5/#/tailwind3/pdf/default.html) in Typescript. \ No newline at end of file +![Output PDF document](Getting_started_images/Output.png) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md index 6013c3d644..a66fb8ec30 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md @@ -1,7 +1,7 @@ --- layout: post title: Create or Generate PDF file in Vue | Syncfusion -description: Learn how to create a PDF file in Vue with easy steps using Syncfusion JavaScript PDF library without depending on Adobe +description: Learn how to create a PDF file in Vue with easy steps using JavaScript PDF Library without depending on Adobe control: PDF platform: document-processing documentation: ug @@ -10,13 +10,13 @@ keywords: pdf, script, vue, javascript # Create or Generate PDF file in Vue application -The Syncfusion® [JavaScript PDF library](https://www.syncfusion.com/document-sdk/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. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is used to create, read, and edit PDF documents. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) also offers functionality to merge, split, stamp, fill forms, and secure PDF files. -This guide explains how to integrate the JavaScript PDF library into an Vue application. +This guide explains how to integrate the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) into an Vue application. -## Integrate the PDF library into an Vue application +## Setting up the Vue 2 project -Step1: To generate a Vue 2 project using Vue-CLI, use the [Vue create](https://cli.vuejs.org/#getting-started) command. Follow these steps to install Vue CLI and create a new project: +To generate a Vue 2 project using Vue-CLI, use the [Vue create](https://cli.vuejs.org/#getting-started) command. Follow these steps to install Vue CLI and create a new project: ```bash npm install -g @vue/cli @@ -38,9 +38,11 @@ When creating a new project, choose the option `Default ([Vue 2] babel, es-lint) Once the `quick start` project is set up with default settings, proceed to add Syncfusion® components to the project. -Step2: All Syncfusion JS 2 packages are published in `npmjs.com` registry. +* **Installing JavaScript PDF package** -* To install the PDF library, use the following command. +All Syncfusion JS 2 packages are published in `npmjs.com` registry. + +* To install the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library), use the following command. ```bash npm install @syncfusion/ej2-pdf --save @@ -56,7 +58,7 @@ N> For image and data extraction features, you need to install the `@syncfusion/ * Ensure your server serves .wasm files with the **Content-Type: application/wasm** MIME type. * This setup is not required for **basic PDF creation**. -Step3: To Create a PDF document, Add the script in `App.vue` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document. +* **Create a PDF document**: Add the script in `App.vue` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document. {% tabs %} {% highlight html tabtitle="~/App.vue" %} @@ -89,7 +91,9 @@ export default { {% endhighlight %} {% endtabs %} -Step4: To run the project, use the following command: +## Run the project + +To run the project, use the following command: ```bash npm run serve @@ -103,7 +107,3 @@ yarn run serve By executing the program, you will generate the following PDF document. ![Vue PDF output](Getting_started_images/Output.png) - -Click [here](https://www.syncfusion.com/document-sdk/javascript-pdf-library) to explore the rich set of Syncfusion® PDF library features. - -An online sample link to [create PDF document](https://document.syncfusion.com/demos/pdf/vue/#/tailwind3/pdf/default.html) in Vue. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md b/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md index e2ab04bab5..c3337a95d3 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md +++ b/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md @@ -1,11 +1,11 @@ --- -title: Digital Signature in JavaScript PDF library | Syncfusion -description: This section explains how to create a digital signature in the PDF document by using JavaScript PDF library +title: Digital Signature in JavaScript PDF Library | Syncfusion +description: This section explains how to create a digital signature in the PDF document by using JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Digital Signature in JavaScript PDF library +# Digital Signature in JavaScript PDF Library The PDF provides support to create, validate, and manage digital signatures in PDF documents, ensuring authenticity, integrity, and security. @@ -149,7 +149,7 @@ document.destroy(); ## Create PDF Signature with External Signing -Syncfusion® PDF provides support to create a new PDF signature using a callback function for external signing, enabling secure and flexible digital signature workflows. +[JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides support to create a new PDF signature using a callback function for external signing, enabling secure and flexible digital signature workflows. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -226,7 +226,7 @@ document.destroy(); ## Create Signature with Public Certificates for External Signing -This example demonstrates how to create a new PDF signature using the [PdfSignature](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignature) class with public certificates for external signing. External signing allows you to implement custom signing logic outside the PDF library while maintaining compliance with cryptographic standards. +This example demonstrates how to create a new PDF signature using the [PdfSignature](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignature) class with public certificates for external signing. External signing allows you to implement custom signing logic outside the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) while maintaining compliance with cryptographic standards. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -356,7 +356,7 @@ document.destroy(); ## Lock Signature -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. +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 [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -952,7 +952,7 @@ document.destroy(); ## Sign existing signature field -This section explains how to sign an existing unsigned signature field in a PDF using the [JavaScript PDF library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). You can locate predefined signature fields and apply a digital signature directly by calling [setSignature()](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignaturefield#setsignature) method of the [PdfSignatureField](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignaturefield) class, without altering the document layout. This is ideal for templates where signature placeholders already exist, allowing you to add digital signatures to the field using a certificate and signature settings. +This section explains how to sign an existing unsigned signature field in a PDF using the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). You can locate predefined signature fields and apply a digital signature directly by calling [setSignature()](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignaturefield#setsignature) method of the [PdfSignatureField](https://ej2.syncfusion.com/documentation/api/pdf/pdfsignaturefield) class, without altering the document layout. This is ideal for templates where signature placeholders already exist, allowing you to add digital signatures to the field using a certificate and signature settings. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} diff --git a/Document-Processing/PDF/PDF-Library/javascript/FormFields.md b/Document-Processing/PDF/PDF-Library/javascript/FormFields.md index 218241afb1..632cdc63c4 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/FormFields.md +++ b/Document-Processing/PDF/PDF-Library/javascript/FormFields.md @@ -1,17 +1,17 @@ --- -title: Form Fields in JavaScript PDF library | Syncfusion -description: This section explains how to create a digital signature in the PDF document by using the JavaScript PDF library +title: Form Fields in JavaScript PDF Library | Syncfusion +description: This section explains how to create a digital signature in the PDF document by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Form Fields in JavaScript PDF library +# Form Fields in JavaScript PDF Library An interactive form, sometimes referred to as an AcroForm, is a collection of fields for gathering information. A PDF document can contain any number of fields appearing on any combination of pages, all of which make a single, globally interactive form spanning the entire document. ## Creating a new PDF form -Syncfusion® PDF allows you to create and manage form in PDF document by using [PdfForm](https://ej2.syncfusion.com/documentation/api/pdf/pdfform) class. The [PdfForm](https://ej2.syncfusion.com/documentation/api/pdf/pdfform) class represents the entire field collection of the form. +[JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) allows you to create and manage form in PDF document by using [PdfForm](https://ej2.syncfusion.com/documentation/api/pdf/pdfform) class. The [PdfForm](https://ej2.syncfusion.com/documentation/api/pdf/pdfform) class represents the entire field collection of the form. ### Adding the text box field @@ -503,7 +503,7 @@ document.destroy(); ## Filling form fields in an existing PDF Document -Syncfusion® PDF allows you to fill the form fields using PdfField class. +[JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) allows you to fill the form fields using PdfField class. ### Filling the text box field @@ -853,7 +853,7 @@ document. Destroy(); ## Add a date field to a PDF form -This section shows how to add a date field to a PDF form, allowing users to enter or select a date within the document. The JavaScript PDF library lets you configure the date field’s appearance, format, and behavior. You can also attach actions that run custom scripts or validations whenever the field is focused, changed, or submitted. +This section shows how to add a date field to a PDF form, allowing users to enter or select a date within the document. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) lets you configure the date field’s appearance, format, and behavior. You can also attach actions that run custom scripts or validations whenever the field is focused, changed, or submitted. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} diff --git a/Document-Processing/PDF/PDF-Library/javascript/HyperLinks.md b/Document-Processing/PDF/PDF-Library/javascript/HyperLinks.md index bc583ce9e2..72b3dfea25 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/HyperLinks.md +++ b/Document-Processing/PDF/PDF-Library/javascript/HyperLinks.md @@ -1,11 +1,11 @@ --- -title: Hyperlinks in JavaScript PDF library | Syncfusion -description: This section explains how to add a hyperlink in a new or existing PDF document by using the JavaScript PDF library +title: Hyperlinks in JavaScript PDF Library | Syncfusion +description: This section explains how to add a hyperlink in a new or existing PDF document by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Hyperlinks in JavaScript PDF library +# Hyperlinks in JavaScript PDF Library In PDF, hyperlinks can be added to allow the users to navigate to another part of PDF file, web page or any other external content. @@ -171,7 +171,7 @@ document.destroy(); ## Modifying or updating existing hyperlinks -This example shows how to update hyperlink annotations in a PDF using Syncfusion’s JavaScript PDF Library. Link annotations retrieved from a page can 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. +This example shows how to update hyperlink annotations in a PDF using [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). Link annotations retrieved from a page can 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. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -215,7 +215,7 @@ document.destroy(); ## Removing hyperlinks -This example demonstrates how to remove hyperlink annotations from a PDF using Syncfusion’s JavaScript PDF Library. By reviewing each annotation and checking whether it represents a hyperlink, you can remove it using either [remove()](https://ej2.syncfusion.com/documentation/api/pdf/pdfannotationcollection#remove) or [removeAt()](https://ej2.syncfusion.com/documentation/api/pdf/pdfannotationcollection#removeat) methods. This helps clean up outdated or unwanted links while keeping the rest of the document content intact. +This example demonstrates how to remove hyperlink annotations from a PDF using [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). By reviewing each annotation and checking whether it represents a hyperlink, you can remove it using either [remove()](https://ej2.syncfusion.com/documentation/api/pdf/pdfannotationcollection#remove) or [removeAt()](https://ej2.syncfusion.com/documentation/api/pdf/pdfannotationcollection#removeat) methods. This helps clean up outdated or unwanted links while keeping the rest of the document content intact. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} diff --git a/Document-Processing/PDF/PDF-Library/javascript/Image-Extraction.md b/Document-Processing/PDF/PDF-Library/javascript/Image-Extraction.md index 871326ea0d..3eef4a1ebf 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Image-Extraction.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Image-Extraction.md @@ -1,11 +1,11 @@ --- -title: Image Extraction in JavaScript PDF library | Syncfusion -description: This section explains how to extract images from PDF documents and retrieve their properties such as position and size using the JavaScript PDF library +title: Image Extraction in JavaScript PDF Library | Syncfusion +description: This section explains how to extract images from PDF documents and retrieve their properties such as position and size using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Image Extraction in JavaScript PDF library +# Image Extraction in JavaScript PDF Library The PDF provides support to extract images from PDF documents and retrieve their properties such as bounds, index and raw byte data. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Images.md b/Document-Processing/PDF/PDF-Library/javascript/Images.md index 79f277cdb9..12ec84a7de 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Images.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Images.md @@ -1,12 +1,12 @@ --- -title: Images in JavaScript PDF library | Syncfusion -description: This section explains how to add and replace images in a PDF document by using the JavaScript PDF library +title: Images in JavaScript PDF Library | Syncfusion +description: This section explains how to add and replace images in a PDF document by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Images in JavaScript PDF library +# Images in JavaScript PDF Library The JavaScript PDF supports JPEG and PNG images. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Layers.md b/Document-Processing/PDF/PDF-Library/javascript/Layers.md index 9d3256f2a2..36c68e1b93 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Layers.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Layers.md @@ -1,16 +1,16 @@ --- -title: Layers in JavaScript PDF library | Syncfusion -description: This section explains how to add a layer in a PDF document using the JavaScript PDF library to organize content and enhance document structure +title: Layers in JavaScript PDF Library | Syncfusion +description: This section explains how to add a layer in a PDF document using the JavaScript PDF Library to organize content and enhance document structure platform: document-processing control: PDF documentation: UG --- -# Layers in JavaScript PDF library +# Layers in JavaScript PDF Library Layers, also known as Option Content refers to sections of content in a PDF document that can be selectively viewed or hidden by document authors or consumers. -JavaScript PDF provides support to create, add and merge the layers into PDF document. +[JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides support to create, add and merge the layers into PDF document. ## Adding layers in a PDF document diff --git a/Document-Processing/PDF/PDF-Library/javascript/Lists.md b/Document-Processing/PDF/PDF-Library/javascript/Lists.md index 1ba0d0f35d..5e08861db1 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Lists.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Lists.md @@ -1,12 +1,12 @@ --- -title: Lists in JavaScript PDF library | Syncfusion -description: This section explains how to work with lists in a PDF document using the JavaScript PDF library to display and manage items in a structured format +title: Lists in JavaScript PDF Library | Syncfusion +description: This section explains how to work with lists in a PDF document using the JavaScript PDF Library to display and manage items in a structured format platform: document-processing control: PDF documentation: UG --- -# Lists in JavaScript PDF library +# Lists in JavaScript PDF Library The PDF allows you list the content in ordered and unordered list. The ordered list can be number or alphabets and the unordered list can be bullets, circles, and images. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Merge-Document.md b/Document-Processing/PDF/PDF-Library/javascript/Merge-Document.md index 62fb2bc11d..77ee2c23f8 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Merge-Document.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Merge-Document.md @@ -1,11 +1,11 @@ --- -title: Merge in JavaScript PDF library | Syncfusion -description: This section explains how to merge multiple PDF documents into a single file and import pages from one document to another using the JavaScript PDF library. +title: Merge in JavaScript PDF Library | Syncfusion +description: This section explains how to merge multiple PDF documents into a single file and import pages from one document to another using the JavaScript PDF Library. platform: document-processing control: PDF documentation: UG --- -# Merge in JavaScript PDF library +# Merge in JavaScript PDF Library The PDF provides support to merge multiple PDF documents into a single file and import pages from one document to another. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Open-and-save-PDF-files.md b/Document-Processing/PDF/PDF-Library/javascript/Open-and-save-PDF-files.md index f386c1633d..5a1e0c774f 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Open-and-save-PDF-files.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Open-and-save-PDF-files.md @@ -1,14 +1,14 @@ --- layout: post -title: Open and save PDF files using JavaScript PDF library | Syncfusion -description: Learn to load and save PDFs in Syncfusion JavaScript PDF library using data as base64 strings or byte arrays. +title: Open and save PDF files using JavaScript PDF Library | Syncfusion +description: Learn how to load and save PDFs in the JavaScript PDF Library using base64 strings or byte arrays as data sources. platform: document-processing control: PDF documentation: ug domainurl: ##DomainURL## --- -# Open and save PDF files in JavaScript PDF library +# Open and save PDF files in JavaScript PDF Library ## Opening an existing PDF document diff --git a/Document-Processing/PDF/PDF-Library/javascript/Overview.md b/Document-Processing/PDF/PDF-Library/javascript/Overview.md index 0ff5a09935..8701f7a8b4 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Overview.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Overview.md @@ -1,20 +1,21 @@ --- layout: post title: Overview of the JavaScript PDF Library Component | Syncfusion -description: Learn about the Syncfusion JavaScript PDF library component, its key capabilities, and supported platforms. +canonical_url: https://www.syncfusion.com/document-sdk/javascript-pdf-library +description: Learn about the JavaScript PDF Library component, including its key capabilities and the platforms it supports. platform: document-processing control: PDF documentation: ug domainurl: ##DomainURL## --- -# Overview of the JavaScript PDF library control +# Overview of the JavaScript PDF Library control -The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is a powerful, high-performance, non-UI class library. It provides seamless integration of advanced PDF functionalities into applications developed with TypeScript, JavaScript, Angular, React, Vue, ASP.NET Core, and ASP.NET MVC. With this library, you can easily read, create, and manipulate PDF documents programmatically without the need of Adobe Acrobat. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) is a lightweight, high-performance, and feature-rich non-UI solution written natively in JavaScript for generating PDF documents in both Node.js and browser environments. It enables developers to seamlessly integrate robust PDF functionality into their applications for creating, reading, and editing PDF documents without relying on Adobe Acrobat. Designed to work across JavaScript, TypeScript, Angular, React, Vue, ASP.NET Core, and ASP.NET MVC platforms, the [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) supports programmatic generation of PDF reports with rich content, including formatted text, images, shapes, hyperlinks, and lists, while complying with PDF 1.7 (ISO 32000-1) and the latest PDF 2.0 (ISO 32000-2) standards to ensure high-quality, compatible PDF document processing. ## Key features -The following are the key features of this library. +The following are the key features of this [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library). * Create PDF documents from scratch with ease. * Load, edit, and save existing PDF files. @@ -42,5 +43,4 @@ The following are the key features of this library. * [React](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-react) * [Vue](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-vue) * [JavaScript](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-javascript) -* [TypeScript](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-typescript) -* [Node.js](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-node) \ No newline at end of file +* [TypeScript](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/create-pdf-document-typescript) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/javascript/PDF-document.md b/Document-Processing/PDF/PDF-Library/javascript/PDF-document.md index 7cefd05480..c1732f5361 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/PDF-document.md +++ b/Document-Processing/PDF/PDF-Library/javascript/PDF-document.md @@ -1,13 +1,13 @@ --- -title: Document in JavaScript PDF library | Syncfusion -description: This section explains how to set document settings and properties in a PDF file by using the JavaScript PDF library +title: Document in JavaScript PDF Library | Syncfusion +description: This section explains how to set document settings and properties in a PDF file by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Document in JavaScript PDF library +# Document in JavaScript PDF Library -The PDF library provides support to create, read, and manipulate PDF documents, allowing you to generate high-quality, secure, and feature-rich PDF files programmatically. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides support to create, read, and manipulate PDF documents, allowing you to generate high-quality, secure, and feature-rich PDF files programmatically. ## Adding the document settings diff --git a/Document-Processing/PDF/PDF-Library/javascript/PDF-pages.md b/Document-Processing/PDF/PDF-Library/javascript/PDF-pages.md index 11b083a7b2..a22e40fb35 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/PDF-pages.md +++ b/Document-Processing/PDF/PDF-Library/javascript/PDF-pages.md @@ -1,11 +1,11 @@ --- -title: Pages in JavaScript PDF library | Syncfusion -description: This section explains how to add, rearrange, remove pages, and detect empty pages in a PDF file by using the JavaScript PDF library +title: Pages in JavaScript PDF Library | Syncfusion +description: This section explains how to add, rearrange, remove pages, and detect empty pages in a PDF file by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Pages in JavaScript PDF library +# Pages in JavaScript PDF Library The PDF provides support to add, remove and rearrange pages in PDF documents, enabling complete control over page management for creating dynamic and customized PDFs. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Redaction.md b/Document-Processing/PDF/PDF-Library/javascript/Redaction.md index 5d4ba6124a..4b6486965c 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Redaction.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Redaction.md @@ -1,13 +1,13 @@ --- -title: Redaction in JavaScript PDF library |Syncfusion -description: This section explains how to redact content from an existing PDF document by using the JavaScript PDF library +title: Redaction in JavaScript PDF Library |Syncfusion +description: This section explains how to redact content from an existing PDF document by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Redaction in JavaScript PDF library +# Redaction in JavaScript PDF Library -Redacting a PDF is the process of permanently removing sensitive or confidential information from PDF documents. Syncfusion® PDF library provides an easy way to redact PDF documents. +Redacting a PDF is the process of permanently removing sensitive or confidential information from PDF documents. [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) provides an easy way to redact PDF documents. N> For redaction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Shapes.md b/Document-Processing/PDF/PDF-Library/javascript/Shapes.md index abaef36e79..6756eba599 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Shapes.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Shapes.md @@ -1,11 +1,11 @@ --- -title: Shapes in JavaScript PDF library | Syncfusion -description: This section explains how to add shapes such as lines, curves, paths, text, rectangles, pies, arcs, Beziers, and ellipses by using the JavaScript PDF library +title: Shapes in JavaScript PDF Library | Syncfusion +description: This section explains how to add shapes such as lines, curves, paths, text, rectangles, pies, arcs, Beziers, and ellipses by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Shapes in JavaScript PDF library +# Shapes in JavaScript PDF Library The PDF has support for adding the below shapes. @@ -21,7 +21,7 @@ The PDF has support for adding the below shapes. ## Adding Shapes to a PDF document -The JavaScript PDF library supports shape rendering exclusively with PDF solid brushes. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) supports shape rendering exclusively with PDF solid brushes. ### Line diff --git a/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md b/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md index 2a1488c2c7..97b7323f8e 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md @@ -1,18 +1,18 @@ --- -title: Split in JavaScript PDF library | Syncfusion -description: This section explains how to split large PDF documents into smaller ones, each containing single or multiple pages, using the JavaScript PDF library +title: Split in JavaScript PDF Library | Syncfusion +description: This section explains how to split large PDF documents into smaller ones, each containing single or multiple pages, using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Split in JavaScript PDF library +# Split in JavaScript PDF Library -The PDF library supports splitting PDF file into single-page or multiple-page PDF documents. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) supports splitting PDF file into single-page or multiple-page PDF documents. ## Splitting a PDF file into individual -The PDF library allows splitting the pages of an existing PDF document into multiple individual PDF documents using [split](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#split) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) allows splitting the pages of an existing PDF document into multiple individual PDF documents using [split](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#split) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -51,7 +51,7 @@ document.destroy(); ## Split a range of pages into a separate PDF document -The PDF library allows splitting a certain range of pages into a separate PDF document using the [splitByPageRanges](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#splitbypageranges) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) allows splitting a certain range of pages into a separate PDF document using the [splitByPageRanges](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#splitbypageranges) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} @@ -90,7 +90,7 @@ document.destroy(); ## Split by a fixed number of pages into a PDF document -The PDF library allows splitting by fixed number of pages of an existing PDF document using the [splitByFixedNumber](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#splitbyfixednumber) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. +The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) allows splitting by fixed number of pages of an existing PDF document using the [splitByFixedNumber](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#splitbyfixednumber) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) class. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} diff --git a/Document-Processing/PDF/PDF-Library/javascript/Templates.md b/Document-Processing/PDF/PDF-Library/javascript/Templates.md index bf21bf1aab..722e53847a 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Templates.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Templates.md @@ -1,11 +1,11 @@ --- -title: Templates in JavaScript PDF library | Syncfusion -description: This section explains how to create a PDF template, which is a drawing surface where contents can be added, by using the JavaScript PDF library +title: Templates in JavaScript PDF Library | Syncfusion +description: This section explains how to create a PDF template, which is a drawing surface where contents can be added, by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Templates in JavaScript PDF library +# Templates in JavaScript PDF Library A PDF template is a drawing surface, where contents can be added. All the elements that can be added to a PdfPage is supported in PdfTemplate as well. The template in turn can be drawn over the page or can be positioned at any part of the page. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Text-Extraction.md b/Document-Processing/PDF/PDF-Library/javascript/Text-Extraction.md index b40430a5cb..351b47bf96 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Text-Extraction.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Text-Extraction.md @@ -1,11 +1,11 @@ --- -title: Text Extraction in JavaScript PDF library | Syncfusion -description: This section explains how to extract text and its bounds from a specific page or the entire PDF document by using the JavaScript PDF library +title: Text Extraction in JavaScript PDF Library | Syncfusion +description: This section explains how to extract text and its bounds from a specific page or the entire PDF document by using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Text Extraction in JavaScript PDF library +# Text Extraction in JavaScript PDF Library The PDF allows you to extract the text from a particular page or the entire PDF document. diff --git a/Document-Processing/PDF/PDF-Library/javascript/Text.md b/Document-Processing/PDF/PDF-Library/javascript/Text.md index 6af826d45c..57c2e8b829 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Text.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Text.md @@ -1,11 +1,11 @@ --- -title: Text in JavaScript PDF library | Syncfusion -description: This section explains how to add text to a PDF by using different types of fonts, including TrueType fonts and standard fonts, with the JavaScript PDF library +title: Text in JavaScript PDF Library | Syncfusion +description: This section explains how to add text to a PDF by using different types of fonts, including TrueType fonts and standard fonts, with the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Text in JavaScript PDF library +# Text in JavaScript PDF Library The PDF provides support to add and format text in PDF documents using various font types, including TrueType and standard fonts, enabling precise control over text appearance and layout. @@ -280,7 +280,7 @@ format.characterSpacing = 1; // Set character spacing // Set font let font: PdfStandardFont = document.embedFont(PdfFontFamily.helvetica, 10, PdfFontStyle.regular); // Draw text -page.graphics.drawString('Syncfusion JavaScript PDF library', font, { x: 10, y: 20, width: 100, height: 200}, new PdfBrush({r: 0, g: 0, b: 255})); +page.graphics.drawString('JavaScript PDF Library', font, { x: 10, y: 20, width: 100, height: 200}, new PdfBrush({r: 0, g: 0, b: 255})); // Save the document document.save('Output.pdf'); // Close the document @@ -298,7 +298,7 @@ format.characterSpacing = 1; // Set character spacing // Set font var font = document.embedFont(ej.pdf.PdfFontFamily.helvetica, 10, ej.pdf.PdfFontStyle.regular); // Draw text -page.graphics.drawString('Syncfusion JavaScript PDF library', font, { x: 10, y: 20, width: 100, height: 200 }, new ej.pdf.PdfBrush({ r: 0, g: 0, b: 255 }), format); +page.graphics.drawString('JavaScript PDF Library', font, { x: 10, y: 20, width: 100, height: 200 }, new ej.pdf.PdfBrush({ r: 0, g: 0, b: 255 }), format); // Save the document document.save('Output.pdf'); // Close the document @@ -411,7 +411,7 @@ document.destroy(); ## Embedded font -This example shows how to embed fonts using [embedFont()](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#embedfont) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) to ensure consistent text rendering across all platforms. The library supports embedding [PdfStandardFont](https://ej2.syncfusion.com/documentation/api/pdf/pdfstandardfont), [PdfCjkStandardFont](https://ej2.syncfusion.com/documentation/api/pdf/pdfcjkstandardfont), and [PdfTrueTypeFont](https://ej2.syncfusion.com/documentation/api/pdf/pdftruetypefont) for reliable Unicode text display. 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. +This example shows how to embed fonts using [embedFont()](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#embedfont) method of the [PdfDocument](https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument) to ensure consistent text rendering across all platforms. The [JavaScript PDF Library](https://www.syncfusion.com/document-sdk/javascript-pdf-library) supports embedding [PdfStandardFont](https://ej2.syncfusion.com/documentation/api/pdf/pdfstandardfont), [PdfCjkStandardFont](https://ej2.syncfusion.com/documentation/api/pdf/pdfcjkstandardfont), and [PdfTrueTypeFont](https://ej2.syncfusion.com/documentation/api/pdf/pdftruetypefont) for reliable Unicode text display. 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. {% tabs %} {% highlight typescript tabtitle="TypeScript" %} diff --git a/Document-Processing/PDF/PDF-Library/javascript/Watermarks.md b/Document-Processing/PDF/PDF-Library/javascript/Watermarks.md index adfc3b0f8d..ab73e514b7 100644 --- a/Document-Processing/PDF/PDF-Library/javascript/Watermarks.md +++ b/Document-Processing/PDF/PDF-Library/javascript/Watermarks.md @@ -1,11 +1,11 @@ --- -title: Watermarks in JavaScript PDF library | Syncfusion -description: This section explains how to add text and image watermarks to both new and existing PDF documents using the JavaScript PDF library +title: Watermarks in JavaScript PDF Library | Syncfusion +description: This section explains how to add text and image watermarks to both new and existing PDF documents using the JavaScript PDF Library platform: document-processing control: PDF documentation: UG --- -# Watermarks in JavaScript PDF library +# Watermarks in JavaScript PDF Library The PDF provides support to add watermark or stamp with text and images in the PDF document. diff --git a/Document-Processing/PDF/PDF-Library/overview.md b/Document-Processing/PDF/PDF-Library/overview.md index 586cdd3a56..3cbd0e96bb 100644 --- a/Document-Processing/PDF/PDF-Library/overview.md +++ b/Document-Processing/PDF/PDF-Library/overview.md @@ -1,5 +1,6 @@ --- title: PDF Document Processing Library | Syncfusion +canonical_url: "https://www.syncfusion.com/document-sdk/net-pdf-library" description: Syncfusion PDF document processing library allows you create, read and write PDF files through code in .NET and Flutter applications without Adobe dependencies. platform: document-processing control: general @@ -11,3 +12,4 @@ keywords: PDF, SDK, Automation, API, create, read, write Syncfusion PDF Document Processing library is a class library used to create, read, and write PDF files through code in .NET [Windows Forms, WPF, ASP.NET MVC, ASP.NET Core, Blazor, MAUI] and Flutter applications without Adobe dependencies. It eases you developers to just integrate this library to achieve the required PDF document processing functionalities and concentrate on core logics of your application. +N> Looking for the full .NET PDF Library overview, features, pricing, and documentation? Visit the [.NET PDF Library](https://www.syncfusion.com/document-sdk/net-pdf-library) page. diff --git a/Document-Processing/PDF/PDF-Viewer/flutter/accessibility.md b/Document-Processing/PDF/PDF-Viewer/flutter/accessibility.md index c6c2fba4d9..995b8941ad 100644 --- a/Document-Processing/PDF/PDF-Viewer/flutter/accessibility.md +++ b/Document-Processing/PDF/PDF-Viewer/flutter/accessibility.md @@ -36,8 +36,8 @@ Widget build(BuildContext context) { The `SfPdfViewer` [theming](https://help.syncfusion.com/flutter/themes) support provides a consistent and standardized appearance, as well as the ability to set the colors for all UI elements. The following APIs allow you to customize the colors of the following elements: -* [searchTextHighlightColor](https://help.syncfusion.com/flutter/pdf-viewer/text-search#customize-the-search-text-highlight-color) -* [selectionColor and selectionHandleColor](https://help.syncfusion.com/flutter/pdf-viewer/text-selection#customize-the-text-selection-and-its-handle-color) +* [searchTextHighlightColor](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/flutter/text-search#customize-the-search-text-highlight-color) +* [selectionColor and selectionHandleColor](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/flutter/text-selection#customize-the-text-selection-and-its-handle-color) ## Large Fonts diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Edit.md b/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Edit.md index 6c436d1f80..8fe6013bba 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Edit.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Edit.md @@ -147,7 +147,7 @@ The [Signature](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.Si #### Suppressing the signature modal view -The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) allows you to suppress the signature modal view and use your own UI in its place. This can be achieved by setting the `FormFieldModalViewAppearingEventArgs.Cancel` property to `true` in the [SignatureModalViewAppearing](https://help.syncfusion.com/cr/document-processing/Syncfusion.Maui.PdfViewer.FormFieldModalViewAppearingEventArgs.html") event handler. +The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) allows you to suppress the signature modal view and use your own UI in its place. This can be achieved by setting the `FormFieldModalViewAppearingEventArgs.Cancel` property to `true` in the [SignatureModalViewAppearing](https://help.syncfusion.com/cr/document-processing/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_SignatureModalViewAppearing) event handler. The below code snippet illustrates suppressing the signature modal view and using a UI implemented in the app in its place. In this illustration, it is assumed that the signature is produced in the form of an image stream when the user completes drawing the signature in the custom dialog. When the signing is completed using the custom dialog, a stamp annotation is created and assigned as the signature of the form field. diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Import-Export.md b/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Import-Export.md index 8d57e77f78..08be3f2821 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Import-Export.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Form-Filling-Import-Export.md @@ -23,7 +23,7 @@ The following formats are supported for both import and export: | JSON | Custom format, compatible with Syncfusion PDF Viewers (WPF, Flutter, JavaScript, etc.). | | XML | Custom format, compatible with Syncfusion PDF Viewers (WPF, Flutter, JavaScript, etc.). | -The required format can be selected from the [DataFormat](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.DataFormat.html) enumeration. +The required format can be selected from the [DataFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.DataFormat.html) enumeration. N> XFDF and FDF are standard formats compatible with global PDF viewers. JSON and XML are Syncfusion-specific formats for cross-platform use within Syncfusion products only. diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/maui/Getting-Started.md index 0f7ee4352e..b101ae69fd 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Getting-Started.md @@ -35,37 +35,38 @@ Before proceeding, ensure the following are in place: ## Step 2: Install the Syncfusion® MAUI PDF Viewer NuGet Package 1. In **Solution Explorer**, right-click the project and choose **Manage NuGet Packages**. -2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) and install the latest version.` -3. Ensure the necessary dependencies are installed correctly and the project is restored. +2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) and install the latest version. +3. Ensure the dependencies are installed and the project is restored. ## Step 3: Register the Syncfusion® Core Handler -[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) is a dependency for all MAUI Syncfusion controls. This package will be automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. Register the Syncfusion® core handler in the `MauiProgram.cs` file. +[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) is automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. +1. Add the following namespace in your `MauiProgram.cs` file. {% tabs %} -{% highlight c# tabtitle="MauiProgram.cs" hl_lines="1 17" %} - +{% highlight c# tabtitle="MauiProgram.cs" %} using Syncfusion.Maui.Core.Hosting; +{% endhighlight %} +{% endtabs %} + +2. Register the Syncfusion core handler in your `MauiProgram.cs` file to use Syncfusion controls. +{% tabs %} +{% highlight c# tabtitle="MauiProgram.cs" hl_lines="12" %} -namespace PdfViewerExample +public static MauiApp CreateMauiApp() { - public class MauiProgram - { - public static MauiApp CreateMauiApp() + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - }); - - builder.ConfigureSyncfusionCore(); - return builder.Build(); - } - } + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + }); + + builder.ConfigureSyncfusionCore(); + return builder.Build(); } + {% endhighlight %} {% endtabs %} @@ -73,25 +74,19 @@ namespace PdfViewerExample Open the `MainPage.xaml` file and follow the steps below. -1. Import the control namespace `Syncfusion.Maui.PdfViewer`, -2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control inside the `` tag. -3. Name the PDF viewer control as `pdfViewer`. - +1. Add the following namespace in your MainPage.xaml file. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} - - +xmlns:syncfusion="clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer" +{% endhighlight %} +{% endtabs %} - - - - - +2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control. +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} + {% endhighlight %} {% endtabs %} @@ -99,87 +94,77 @@ Open the `MainPage.xaml` file and follow the steps below. 1. From the solution explorer of the project, add a new folder to the project named `Assets` and add the PDF document you need to load into the PDF viewer. Here, a PDF document named `PDF_Succinctly.pdf` is used. 2. In Visual Studio, right-click the added PDF document and set its `Build Action` as `Embedded Resource`. -3. In this example, we will load the PDF document through MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. +3. In this example, the PDF document is loaded using MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. {% tabs %} {% highlight c# tabtitle="PdfViewerViewModel.cs" %} + +using System.ComponentModel; +using System.Reflection; - using System.Reflection; - using System.ComponentModel; - - namespace PdfViewerExample +internal class PdfViewerViewModel : INotifyPropertyChanged +{ + private Stream pdfDocumentStream; + + /// + /// Occurs when a property value changes. + /// + public event PropertyChangedEventHandler? PropertyChanged; + + /// + /// Gets or sets the stream of the currently loaded PDF document. + /// + public Stream PdfDocumentStream { - class PdfViewerViewModel : INotifyPropertyChanged + get { - private Stream pdfDocumentStream; - - /// - /// Occurs when a property value changes. - /// - public event PropertyChangedEventHandler? PropertyChanged; - - /// - /// Gets or sets the stream of the currently loaded PDF document. - /// - public Stream PdfDocumentStream - { - get - { - return pdfDocumentStream; - } - set - { - pdfDocumentStream = value; - OnPropertyChanged(nameof(PdfDocumentStream)); - } - } - - /// - /// Initializes a new instance of the class. - /// - public PdfViewerViewModel() - { - // Load the embedded PDF document stream. - pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); - } - - /// - /// Raises the event for the specified property name. - /// - /// The name of the property that changed. - public void OnPropertyChanged(string name) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); - } + return pdfDocumentStream; + } + set + { + pdfDocumentStream = value; + OnPropertyChanged(nameof(PdfDocumentStream)); } } + + /// + /// Initializes a new instance of the class. + /// + public PdfViewerViewModel() + { + // Load the embedded PDF document stream. + // Replace 'PdfViewerExample' with your project's namespace in resource path + pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); + } + + /// + /// Raises the event for the specified property name. + /// + /// The name of the property that changed. + public void OnPropertyChanged(string name) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } +} {% endhighlight %} {% endtabs %} -4. Open the `MainPage.xaml` file again and add the default namespace of the created .NET MAUI project and name it as `local`. Here the default namespace of the demo sample `PdfViewerExample` is used. -5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext` of the `ContentPage`. -6. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. - +4. Open the `MainPage.xaml` file again and add the namespace `PdfViewerExample` and name it as `local`. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} +xmlns:local="clr-namespace:PdfViewerExample" +{% endhighlight %} +{% endtabs %} - - - - - - +5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext`. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} + + + - - - - - + {% endhighlight %} {% endtabs %} @@ -214,37 +199,38 @@ Before proceeding, ensure the following are in place: ## Step 2: Install the Syncfusion® MAUI PDF Viewer NuGet Package 1. In **Solution Explorer**, right-click the project and choose **Add NuGet Package**. -2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) and install the latest version.` -3. Ensure the necessary dependencies are installed correctly, and the project is restored. +2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) and install the latest version. +3. Ensure the dependencies are installed, and the project is restored. ## Step 3: Register the Syncfusion® Core Handler -[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) is a dependency for all MAUI Syncfusion controls. This package will be automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. Register the Syncfusion® core handler in the `MauiProgram.cs` file. +[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) will be automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. +1. Add the following namespace in your `MauiProgram.cs` file. {% tabs %} -{% highlight c# tabtitle="MauiProgram.cs" hl_lines="1 17" %} - +{% highlight c# tabtitle="MauiProgram.cs" %} using Syncfusion.Maui.Core.Hosting; +{% endhighlight %} +{% endtabs %} -namespace PdfViewerExample +2. Register the Syncfusion core handler in your `MauiProgram.cs` file to use Syncfusion controls. +{% tabs %} +{% highlight c# tabtitle="MauiProgram.cs" hl_lines="12" %} + +public static MauiApp CreateMauiApp() { - public class MauiProgram - { - public static MauiApp CreateMauiApp() + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - }); - - builder.ConfigureSyncfusionCore(); - return builder.Build(); - } - } + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + }); + + builder.ConfigureSyncfusionCore(); + return builder.Build(); } + {% endhighlight %} {% endtabs %} @@ -252,24 +238,20 @@ namespace PdfViewerExample Open the `MainPage.xaml` file and follow the steps below. -1. Import the control namespace `Syncfusion.Maui.PdfViewer`, -2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control inside the `` tag. -3. Name the PDF viewer control as `pdfViewer`. - +1. Add the following namespace in your MainPage.xaml file. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} - - +xmlns:syncfusion="clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer" +{% endhighlight %} +{% endtabs %} + +2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control. + +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} - - - - - + {% endhighlight %} {% endtabs %} @@ -288,89 +270,78 @@ Open the `MainPage.xaml` file and follow the steps below. {% endhighlight %} {% endtabs %} +3. In this example, the PDF document is loaded using MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. -3. In this example, we will load the PDF document through MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. - -{% tabs %} -{% highlight c# tabtitle="PdfViewerViewModel.cs" %} + {% tabs %} + {% highlight c# tabtitle="PdfViewerViewModel.cs" %} -using System.Reflection; using System.ComponentModel; - -namespace PdfViewerExample +using System.Reflection; + +internal class PdfViewerViewModel : INotifyPropertyChanged { - class PdfViewerViewModel : INotifyPropertyChanged - { - private Stream pdfDocumentStream; + private Stream pdfDocumentStream; - /// - /// Occurs when a property value changes. - /// - public event PropertyChangedEventHandler? PropertyChanged; + /// + /// Occurs when a property value changes. + /// + public event PropertyChangedEventHandler? PropertyChanged; - /// - /// Gets or sets the stream of the currently loaded PDF document. - /// - public Stream PdfDocumentStream + /// + /// Gets or sets the stream of the currently loaded PDF document. + /// + public Stream PdfDocumentStream + { + get { - get - { - return pdfDocumentStream; - } - set - { - pdfDocumentStream = value; - OnPropertyChanged(nameof(PdfDocumentStream)); - } + return pdfDocumentStream; } - - /// - /// Initializes a new instance of the class. - /// - public PdfViewerViewModel() + set { - // Load the embedded PDF document stream. - pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); + pdfDocumentStream = value; + OnPropertyChanged(nameof(PdfDocumentStream)); } + } - /// - /// Raises the event for the specified property name. - /// - /// The name of the property that changed. - public void OnPropertyChanged(string name) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); - } + /// + /// Initializes a new instance of the class. + /// + public PdfViewerViewModel() + { + // Load the embedded PDF document stream. + // Replace 'PdfViewerExample' with your project's namespace in resource path + pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); } + + /// + /// Raises the event for the specified property name. + /// + /// The name of the property that changed. + public void OnPropertyChanged(string name) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } } {% endhighlight %} {% endtabs %} -4. Open the `MainPage.xaml` file again and add the default namespace of the created .NET MAUI project and name it as `local`. Here the default namespace of the demo sample `PdfViewerExample` is used. -5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext` of the `ContentPage`. -6. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. - +4. Open the `MainPage.xaml` file again and add the namespace `PdfViewerExample`and name it as `local`. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} +xmlns:local="clr-namespace:PdfViewerExample" +{% endhighlight %} +{% endtabs %} - - - - - - - - - - - - +5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext`. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} + + + + + {% endhighlight %} {% endtabs %} @@ -404,8 +375,8 @@ Before proceeding, ensure the following are set up: ## Step 2: Install the Syncfusion® MAUI PDF Viewer NuGet Package 1. In **Solution Explorer,** right-click the project and choose **Manage NuGet Packages.** -2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer/) and install the latest version. -3. Ensure the necessary dependencies are installed correctly, and the project is restored. If not, open the Terminal in Rider and manually run the following code. +2. Search for [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) and install the latest version. +3. Ensure the dependencies are installed, and the project is restored. If not, open the Terminal in Rider and manually run the following code. {% tabs %} {% highlight c# tabtitle="terminal" %} @@ -417,32 +388,33 @@ dotnet restore ## Step 3: Register the Syncfusion® Core Handler -[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) is a dependency for all MAUI Syncfusion controls. This package will be automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. Register the Syncfusion® core handler in the `MauiProgram.cs` file. +[Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) is a dependency for all MAUI Syncfusion controls. This package will be automatically installed as a dependency when [Syncfusion.Maui.PdfViewer](https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer) NuGet is installed. +1. Add the following namespace in your `MauiProgram.cs` file. {% tabs %} -{% highlight c# tabtitle="MauiProgram.cs" hl_lines="1 17" %} - +{% highlight c# tabtitle="MauiProgram.cs" %} using Syncfusion.Maui.Core.Hosting; +{% endhighlight %} +{% endtabs %} + +2. Register the Syncfusion core handler in your `MauiProgram.cs` file to use Syncfusion controls. +{% tabs %} +{% highlight c# tabtitle="MauiProgram.cs" hl_lines="12" %} -namespace PdfViewerExample +public static MauiApp CreateMauiApp() { - public class MauiProgram - { - public static MauiApp CreateMauiApp() + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - }); - - builder.ConfigureSyncfusionCore(); - return builder.Build(); - } - } + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + }); + + builder.ConfigureSyncfusionCore(); + return builder.Build(); } + {% endhighlight %} {% endtabs %} @@ -450,24 +422,19 @@ namespace PdfViewerExample Open the `MainPage.xaml` file and follow the steps below. -1. Import the control namespace `Syncfusion.Maui.PdfViewer`. -2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control inside the `` tag. -3. Name the PDF viewer control as `pdfViewer`. - +1. Add the following namespace in your MainPage.xaml file. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} + xmlns:syncfusion="clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer" +{% endhighlight %} +{% endtabs %} + +2. Add the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control. Name the PDF viewer control as `pdfViewer`. - - +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} - - - - - + {% endhighlight %} {% endtabs %} @@ -486,87 +453,77 @@ Open the `MainPage.xaml` file and follow the steps below. {% endhighlight %} {% endtabs %} +3. In this example, the PDF document is loaded using MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. -3. In this example, we will load the PDF document through MVVM binding. Create a new C# file named `PdfViewerViewModel.cs` and add the following code snippet. - -{% tabs %} -{% highlight c# tabtitle="PdfViewerViewModel.cs" %} + {% tabs %} + {% highlight c# tabtitle="PdfViewerViewModel.cs" %} -using System.Reflection; using System.ComponentModel; +using System.Reflection; -namespace PdfViewerExample +internal class PdfViewerViewModel : INotifyPropertyChanged { - class PdfViewerViewModel : INotifyPropertyChanged - { - private Stream pdfDocumentStream; + private Stream pdfDocumentStream; - /// - /// Occurs when a property value changes. - /// - public event PropertyChangedEventHandler? PropertyChanged; + /// + /// Occurs when a property value changes. + /// + public event PropertyChangedEventHandler? PropertyChanged; - /// - /// Gets or sets the stream of the currently loaded PDF document. - /// - public Stream PdfDocumentStream + /// + /// Gets or sets the stream of the currently loaded PDF document. + /// + public Stream PdfDocumentStream + { + get { - get - { - return pdfDocumentStream; - } - set - { - pdfDocumentStream = value; - OnPropertyChanged(nameof(PdfDocumentStream)); - } + return pdfDocumentStream; } - - /// - /// Initializes a new instance of the class. - /// - public PdfViewerViewModel() + set { - // Load the embedded PDF document stream. - pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); + pdfDocumentStream = value; + OnPropertyChanged(nameof(PdfDocumentStream)); } + } - /// - /// Raises the event for the specified property name. - /// - /// The name of the property that changed. - public void OnPropertyChanged(string name) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); - } + /// + /// Initializes a new instance of the class. + /// + public PdfViewerViewModel() + { + // Load the embedded PDF document stream. + // Replace 'PdfViewerExample' with your project's namespace in resource path + pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("PdfViewerExample.Assets.PDF_Succinctly.pdf"); } + + /// + /// Raises the event for the specified property name. + /// + /// The name of the property that changed. + public void OnPropertyChanged(string name) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } } {% endhighlight %} {% endtabs %} -4. Open the `MainPage.xaml` file again and add the default namespace of the created .NET MAUI project and name it as `local`. Here the default namespace of the demo sample `PdfViewerExample` is used. -5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext` of the `ContentPage`. -6. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. - +4. Open the `MainPage.xaml` file again and add the namespace `PdfViewerExample` and name it as `local`. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} +xmlns:local="clr-namespace:PdfViewerExample" +{% endhighlight %} +{% endtabs %} - - - - - - +5. Set an instance of the `PdfViewerViewModel` class as the `BindingContext`. Bind the PDF viewer's [DocumentSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource) to the `PdfDocumentStream` property of the `PdfViewerViewModel` class. +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" %} + + + - - - - - + {% endhighlight %} {% endtabs %} @@ -590,16 +547,16 @@ N> You can refer to our [.NET MAUI PDF Viewer](https://www.syncfusion.com/maui-c ## What to Do Next -Now that the PDF Viewer is running, here is a suggested learning path to explore its capabilities: - -| Step | Goal | Topic | -|---|---|---| -| 1 | **Open documents from different sources** | Load a PDF from a URL, the device's file system, a Base64 string, or a password-protected file. → [Open a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/open-a-document) | -| 2 | **Navigate and read** | Jump to specific pages, control zoom levels, and search for text. → [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/page-navigation) · [Magnification](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/magnification) · [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/text-search) | -| 3 | **Add annotations** | Highlight text, draw shapes, add sticky notes, or use freehand ink. → [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview) | -| 4 | **Fill form fields** | Read, edit, validate, import, and export PDF form data. → [Form Filling Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/form-filling-overview) | -| 5 | **Save and print** | Persist changes back to a file stream, optionally flattening annotations. → [Save a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/save-a-document) · [Print a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/print-a-document) | -| 6 | **Customize the toolbar** | Show, hide, add, or remove toolbar items to match your app's workflow. → [Toolbar Customization](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/toolbar-customization) | -| 7 | **Redact sensitive content** | Permanently remove confidential text or images before sharing. → [Redaction](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/redaction) | +Now that the PDF Viewer is running, you can explore the following features: + +| Topics | Resources | +|---|---| +| **Open documents from different sources** | Load a PDF from a URL, the device's file system, a Base64 string, or a password-protected file. → [Open a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/open-a-document) | +| **Navigate and read** | Jump to specific pages, control zoom levels, and search for text. → [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/page-navigation) · [Magnification](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/magnification) · [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/text-search) | +| **Add annotations** | Highlight text, draw shapes, add sticky notes, or use freehand ink. → [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview) | +| **Fill form fields** | Read, edit, validate, import, and export PDF form data. → [Form Filling Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/form-filling-overview) | +| **Save and print** | Persist changes back to a file stream, optionally flattening annotations. → [Save a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/save-a-document) · [Print a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/print-a-document) | +| **Customize the toolbar** | Show, hide, add, or remove toolbar items to match your app's workflow. → [Toolbar Customization](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/toolbar-customization) | +| **Redact sensitive content** | Permanently remove confidential text or images before sharing. → [Redaction](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/redaction) | * For migration from Xamarin to .NET MAUI, please follow the [Migration Guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/migration). diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Import-Export-Annotations.md b/Document-Processing/PDF/PDF-Viewer/maui/Import-Export-Annotations.md index bea5d94708..8eeb9a0f9c 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Import-Export-Annotations.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Import-Export-Annotations.md @@ -18,7 +18,7 @@ The import and export of annotations support the following file data formats: * FDF * JSON -The required file format can be chosen from the [AnnotationDataFormat](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.AnnotationDataFormat.html) enumeration. In the following sections, only the `XFDF` file format is explained for brevity. +The required file format can be chosen from the [AnnotationDataFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.AnnotationDataFormat.html) enumeration. In the following sections, only the `XFDF` file format is explained for brevity. N> The XFDF and FDF are the standard file data formats that can be used across global PDF viewers. Whereas, JSON is the custom format that can only be used across the Syncfusion PDF Viewers supported on other platforms like WPF, Flutter, JavaScript, etc. diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Overview.md b/Document-Processing/PDF/PDF-Viewer/maui/Overview.md index 3e2b3193fd..4fe084bb75 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Overview.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Overview.md @@ -17,19 +17,19 @@ Build powerful PDF experiences into your .NET MAUI app with the [SfPdfViewer](ht | Topic | Description | |---|---| | [Getting Started](https://help.syncfusion.com/maui/pdf-viewer/getting-started) | Install the package, configure the handler, and load your first PDF document. | -| [Open a Document](https://help.syncfusion.com/maui/pdf-viewer/open-a-document) | Load documents from streams, local storage, URLs, Base64 strings, or password-protected files. | -| [Annotations Overview](https://help.syncfusion.com/maui/pdf-viewer/annotations-overview) | Add, edit, import, and export highlights, shapes, ink, stamps, sticky notes, and more. | +| [Open a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/open-a-document) | Load documents from streams, local storage, URLs, Base64 strings, or password-protected files. | +| [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview) | Add, edit, import, and export highlights, shapes, ink, stamps, sticky notes, and more. | | [Form Filling Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/form-filling-overview) | Fill, edit, import, and export PDF form fields including text boxes, checkboxes, and signatures. | -| [Text Search](https://help.syncfusion.com/maui/pdf-viewer/text-search) | Search for text and navigate all occurrences in a document. | -| [Save a Document](https://help.syncfusion.com/maui/pdf-viewer/save-a-document) | Save modified documents to a file stream, with optional annotation flattening. | -| [Toolbar](https://help.syncfusion.com/maui/pdf-viewer/toolbar) | Reference guide to all built-in toolbar names and toolbar item names. | +| [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/text-search) | Search for text and navigate all occurrences in a document. | +| [Save a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/save-a-document) | Save modified documents to a file stream, with optional annotation flattening. | +| [Toolbar](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/toolbar) | Reference guide to all built-in toolbar names and toolbar item names. | | [Toolbar Customization](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/toolbar-customization) | Show, hide, add, remove, and reorder toolbar items. | -| [UI Customization](https://help.syncfusion.com/maui/pdf-viewer/ui-customization) | Customize the appearance of the PDF Viewer control. | +| [UI Customization](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/ui-customization) | Customize the appearance of the PDF Viewer control. | | [Redaction](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/redaction) | Permanently remove sensitive content from PDF documents. | | [Electronic Signature](https://help.syncfusion.com/maui/pdf-viewer/signature) | Add handwritten, typed, or image-based signatures. | | [Keyboard Shortcuts](https://help.syncfusion.com/maui/pdf-viewer/keyboard-shortcuts) | Keyboard shortcuts available on desktop platforms. | | [Localization](https://help.syncfusion.com/maui/pdf-viewer/localization) | Translate all built-in strings into any supported language. | -| [Migration Guide](https://help.syncfusion.com/maui/pdf-viewer/migration) | Migrate from Xamarin.Forms SfPdfViewer to .NET MAUI SfPdfViewer. | +| [Migration Guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/migration) | Migrate from Xamarin.Forms SfPdfViewer to .NET MAUI SfPdfViewer. | ## Key Features diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Page-Navigation.md b/Document-Processing/PDF/PDF-Viewer/maui/Page-Navigation.md index d7462bb281..155f749734 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Page-Navigation.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Page-Navigation.md @@ -123,7 +123,7 @@ private void LastPageButton_Clicked(object sender, EventArgs e) The example project with the page navigation functionalities can be downloaded [here](https://github.com/SyncfusionExamples/maui-pdf-viewer-examples). -### Page Navigation via Scroll Head(Mobile Platform) +## Page Navigation via Scroll Head(Mobile Platform) On Android and iOS platforms, the scroll head offers a quick way to move through pages.Tap the scroll head to open a page navigation dialog. Enter a valid page number and tap **OK** to jump directly to that page. diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Viewing-PDF.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Viewing-PDF.md index cdcdadf98b..e81865abeb 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Viewing-PDF.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Viewing-PDF.md @@ -8,12 +8,12 @@ documentation: ug --- # Viewing PDF in UWP PDF Viewer (SfPdfViewer) -The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) allows you to load the PDF documents from the [`stream`](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-5.0), [`storageFile`](https://learn.microsoft.com/en-us/uwp/api/windows.storage.storagefile?view=winrt-19041), and [`PdfLoadedDocument`](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object. +The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) allows you to load the PDF documents from the [`stream`](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-5.0), [`storageFile`](https://learn.microsoft.com/en-us/uwp/api/windows.storage.storagefile?view=winrt-19041), and [`PdfLoadedDocument`](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object. ## Loading a PDF using PdfLoadedDocument object The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) allows you to load the PDF document synchronously and asynchronously from the specified pdfLoadedDocument object using the `LoadDocument` and `LoadDocumentAsync` methods respectively. -The following code explains how to load the document synchronously using a [`PdfLoadedDocument`](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object that was created from the PDF in the Assets folder of the application. +The following code explains how to load the document synchronously using a [`PdfLoadedDocument`](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object that was created from the PDF in the Assets folder of the application. {% tabs %} {% highlight c# %} @@ -33,7 +33,7 @@ pdfViewer.LoadDocument(loadedDocument) {% endhighlight %} {% endtabs %} -The following code explains how to load the document asynchronously using the [`PdfLoadedDocument`](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object that was created from the PDF in the Assets folder of the application. +The following code explains how to load the document asynchronously using the [`PdfLoadedDocument`](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object that was created from the PDF in the Assets folder of the application. {% tabs %} {% highlight c# %} @@ -94,6 +94,175 @@ Await pdfViewer.LoadDocumentAsync(fileStream, cancellationTokenSource.Token) In the above code sample, the [`CancellationToken`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-5.0) enables you to cancel the asynchronous loading of a PDF document when it is in progress. +## Loading PDF through binding + +The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) supports loading a PDF document using data binding. This is useful in MVVM-based applications where the document stream is exposed as a property. + +### Creating a view model + +1. Add a PDF file to the project and set its **Build Action** to **Embedded Resource**. + +2. Create a simple class (`PdfReport.cs`) that provides the PDF stream property for binding. + +{% tabs %} +{% highlight c# %} +class PdfReport : INotifyPropertyChanged + { + private Stream docStream; + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Stream object to be bound to the ItemsSource of the PDF Viewer + /// + public Stream DocumentStream + { + get + { + return docStream; + } + set + { + docStream = value; + OnPropertyChanged(new PropertyChangedEventArgs("DocumentStream")); + } + } + + public PdfReport() + { + //Loads the stream from the embedded resource. + Assembly assembly = typeof(MainPage).GetTypeInfo().Assembly; + docStream = assembly.GetManifestResourceStream("SimpleSample.Assets.JavaScript_Succinctly.pdf"); + } + + public void OnPropertyChanged(PropertyChangedEventArgs e) + { + if (PropertyChanged != null) + PropertyChanged(this, e); + } + } +{% endhighlight %} +{% highlight vbnet %} +Class PdfReport + Implements INotifyPropertyChanged + + Private docStream As Stream + Private Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged + + ''' + ''' Stream object to be bound to the ItemsSource of the PDF Viewer + ''' + Public Property DocumentStream As Stream + Get + Return docStream + End Get + Set + docStream = Value + OnPropertyChanged(New PropertyChangedEventArgs("DocumentStream")) + End Set + End Property + + Public Sub New() + 'Loads the stream from the embedded resource. + Dim assembly As Assembly = GetType(MainPage).GetTypeInfo().Assembly + docStream = assembly.GetManifestResourceStream("SimpleSample.JavaScript_Succinctly.pdf") + End Sub + + Public Sub OnPropertyChanged(e As PropertyChangedEventArgs) + RaiseEvent PropertyChanged(Me, e) + End Sub +End Class +{% endhighlight %} +{% endtabs %} + +### Binding the document + +To bind the [DocumentStream](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_DocumentStream) property of the PdfReport class to the PDF viewer, you need to set the [DataContext](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.frameworkelement.datacontext?view=winrt-28000) of the page. After setting the DataContext, bind the [`ItemsSource`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_ItemsSource) property of the `SfPdfViewer` to the `DocumentStream` property. + +The following example shows how to set the `DataContext` and `ItemsSource`property in XAML: + +{% tabs %} +{% highlight xaml %} + + + + + + + + +{% endhighlight %} +{% endtabs %} + + +## Loading PDF document using FileOpenPicker + +The `SfPdfViewer` allows users to select and load a PDF document at runtime using the `FileOpenPicker`. The selected file is returned as a `StorageFile`, which can be directly loaded into the viewer. + +{% tabs %} +{% highlight xaml %} +