diff --git a/Document-Processing/PDF/PDF-Library/NET/Assemblies-Required.md b/Document-Processing/PDF/PDF-Library/NET/Assemblies-Required.md index e4e7b12ebe..0df42ae77c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Assemblies-Required.md +++ b/Document-Processing/PDF/PDF-Library/NET/Assemblies-Required.md @@ -138,7 +138,6 @@ N> 1. The .NET Standard assemblies are available at the following Essential Stud {Installed directory}\Syncfusion®\Essential Studio{Product version}\precompiledassemblies\{Product version}\ N> 2. Syncfusion® components are also available on [nuget.org](https://www.nuget.org/packages?q=syncfusion). N> 3. Starting with **v16.2.0.x**, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you must also include a license key in your projects. Refer to the [licensing overview](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn how to register the Syncfusion® license key in your application. -N> 4. For .NET Core, .NET 5+, .NET MAUI, WinUI, and Blazor, Syncfusion recommends using the NuGet packages for easier version management and dependency resolution. ## Converting HTML to PDF diff --git a/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-Save-PDF-Documents-in-MAUI.md b/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-Save-PDF-Documents-in-MAUI.md index 3ea1676557..b31ac298a3 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-Save-PDF-Documents-in-MAUI.md +++ b/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-Save-PDF-Documents-in-MAUI.md @@ -12,7 +12,7 @@ keywords: maui os save pdf, maui os load pdf, c# save pdf, c# load pdf The [.NET MAUI PDF library](https://www.syncfusion.com/document-sdk/net-pdf-library) is used to create, read, and edit PDF documents programmatically without the dependency on Adobe Acrobat. Using this library, you can **open and save a PDF document in .NET MAUI**. **Prerequisites:** -To create .NET Multi-platform App UI (.NET MAUI) apps, you need the latest versions of Visual Studio 2022 and .NET 6. For more details, refer [here](https://learn.microsoft.com/en-us/dotnet/maui/get-started/installation?view=net-maui-7.0&tabs=vswin). +To create .NET Multi-platform App UI (.NET MAUI) apps, you need the latest versions of Visual Studio 2022 and .NET 8. For more details, refer [here](https://learn.microsoft.com/en-us/dotnet/maui/get-started/installation?view=net-maui-7.0&tabs=vswin). ## Steps to open and save PDF documents programmatically in .NET MAUI @@ -219,6 +219,4 @@ Download the helper files from this [link](https://www.syncfusion.com/downloads/ -Click [here](https://www.syncfusion.com/document-sdk/net-pdf-library) to explore the rich set of Syncfusion® PDF library features. - - +Click [here](https://www.syncfusion.com/document-sdk/net-pdf-library) to explore the rich set of Syncfusion® PDF library features. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-save-PDF-document-in-Blazor.md b/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-save-PDF-document-in-Blazor.md index 1318353473..01216fbf18 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-save-PDF-document-in-Blazor.md +++ b/Document-Processing/PDF/PDF-Library/NET/Loading-and-saving-document/Open-and-save-PDF-document-in-Blazor.md @@ -13,8 +13,8 @@ The [Blazor PDF library](https://www.syncfusion.com/document-sdk/net-pdf-library **Prerequisites:** -* Visual Studio 2019 Preview -* Install the [.NET Core SDK 3.1 Preview](https://dotnet.microsoft.com/en-us/download/dotnet/3.1) +* Visual Studio 2022 Preview +* Install the [.NET Core SDK](https://dotnet.microsoft.com/en-us/download/dotnet) **Creating a Blazor project** @@ -22,7 +22,7 @@ The [Blazor PDF library](https://www.syncfusion.com/document-sdk/net-pdf-library * Open Tools > Options in the menu bar. * Open the Projects and Solutions node. Open the .NET Core tab. * Check the box for Use previews of the .NET Core SDK and click OK. -* Restart the Visual Studio 2019. +* Restart the Visual Studio 2022. ## Server app @@ -404,6 +404,6 @@ By executing the program, you will get the **PDF document** as follows. N> Even though PDF library works in WASM app, it is recommended to use server deployment. Since the WASM app deployment increases the application payload size. -Kindly explore the [supported and unsupported features of PDF library in Blazor](https://www.syncfusion.com/document-processing/pdf-framework/blazor/pdf-library). +Kindly explore the [supported and unsupported features of PDF library](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/supported-and-unsupported-features). -Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor) to explore the rich set of Syncfusion® PDF library features. \ No newline at end of file +Click [here](https://www.syncfusion.com/document-sdk/net-pdf-library) to explore the rich set of Syncfusion® PDF library features. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/NET/Open-PDF-file.md b/Document-Processing/PDF/PDF-Library/NET/Open-PDF-file.md index 32fbfadb8d..5eaa57c886 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Open-PDF-file.md +++ b/Document-Processing/PDF/PDF-Library/NET/Open-PDF-file.md @@ -1,14 +1,15 @@ --- title: Open PDF file in C# and VB.NET | Syncfusion -description: This page describes how to open PDF file from or to file system, and stream in C# and VB.NET using Syncfusion .NET PDF library. +description: This page describes how to open a PDF file from the file system, a stream, or a byte array in C# and VB.NET using the Syncfusion .NET PDF library. platform: document-processing control: PDF documentation: UG --- # Open PDF file in C# and VB.NET -## Namespace required -The following namespaces of Essential® PDF need to be included in your application to load the PDF document. +## Namespaces required + +The following namespace of the Essential® PDF library must be included in your application to load a PDF document. {% tabs %} @@ -34,116 +35,116 @@ Imports Syncfusion.Pdf.Parsing ## Opening an existing PDF document -You can open an existing PDF document by using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class. The following example shows how to load an existing document from physical path. +You can open an existing PDF document by using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class. The following example shows how to load an existing document from a physical path on the file system. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an existing PDF document from a file path through the `PdfLoadedDocument` constructor. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"Input.pdf"); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing document from file system. +//Open an existing document from the file system. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf"); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing document from file system. +'Open an existing document from the file system. Dim loadedDocument As New PdfLoadedDocument("Input.pdf") {% endhighlight %} {% endtabs %} -## Opening an existing PDF document from Stream +## Opening an existing PDF document from a stream -You can open an existing document from stream by using [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class as shown below. +You can open an existing document from a stream by using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class as shown below. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an existing PDF document from a stream through the `PdfLoadedDocument` constructor. FileStream inputPDFStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream); {% endhighlight %} -{% highlight c# tabtitle="C# [Windows-specific]" %} +{% highlight c# tabtitle="C# [Windows-specific]" %} -//Opens an existing document from stream. +//Open an existing document from a stream. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Opens an existing document from stream. +'Open an existing document from a stream. Dim loadedDocument As New PdfLoadedDocument(inputPDFStream) {% endhighlight %} {% endtabs %} -## Opening an existing PDF document from byte array +## Opening an existing PDF document from a byte array -You can open an existing document from byte array by using [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class as shown in the below code example. +You can open an existing document from a byte array by using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class as shown in the following code example. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing document from byte array. -PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray); +//Open an existing document from a byte array. +PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing document from byte array. -PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray); +//Open an existing document from a byte array. +PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Opens an existing document from byte array. +'Open an existing document from a byte array. Dim loadedDocument As New PdfLoadedDocument(inputPDFByteArray) {% endhighlight %} {% endtabs %} -## Opening an Encrypted PDF document +## Opening an encrypted PDF document -You can open an existing encrypted PDF document from either the file system or the stream or the byte array using [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument__ctor_System_Byte___System_String_) class as shows in the below code example. +You can open an existing encrypted PDF document from the file system, a stream, or a byte array using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument__ctor_System_Byte___System_String_) class, as shown in the following code examples. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an encrypted PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an encrypted PDF document from a file path through the `PdfLoadedDocument` constructor. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"Input.pdf", "password"); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing encrypted document from disk. +//Open an existing encrypted document from the file system. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf", "password"); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing encrypted document from disk. -Dim loadedDocument As New PdfLoadedDocument("Input.pdf","password") +'Open an existing encrypted document from the file system. +Dim loadedDocument As New PdfLoadedDocument("Input.pdf", "password") {% endhighlight %} @@ -153,7 +154,7 @@ Dim loadedDocument As New PdfLoadedDocument("Input.pdf","password") {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an encrypted PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an encrypted PDF document from a stream through the `PdfLoadedDocument` constructor. FileStream inputPDFStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, "password"); @@ -161,15 +162,15 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, "passwo {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing encrypted document from byte array. +//Open an existing encrypted document from a stream. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, "password"); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing encrypted document from stream. -Dim loadedDocument As New PdfLoadedDocument(inputPDFStream,"password") +'Open an existing encrypted document from a stream. +Dim loadedDocument As New PdfLoadedDocument(inputPDFStream, "password") {% endhighlight %} @@ -179,22 +180,22 @@ Dim loadedDocument As New PdfLoadedDocument(inputPDFStream,"password") {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing encrypted document from byte array. +//Open an existing encrypted document from a byte array. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray, "password"); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing encrypted document from byte array. +//Open an existing encrypted document from a byte array. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray, "password"); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing encrypted document from byte array. -Dim loadedDocument As New PdfLoadedDocument(inputPDFByteArray,"password") +'Open an existing encrypted document from a byte array. +Dim loadedDocument As New PdfLoadedDocument(inputPDFByteArray, "password") {% endhighlight %} @@ -202,27 +203,27 @@ Dim loadedDocument As New PdfLoadedDocument(inputPDFByteArray,"password") ## Opening a corrupted PDF document -You can open a corrupted PDF document from either the file system or the stream or the byte array using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument__ctor_System_Byte___System_String_System_Boolean_) as shown below. +You can open a corrupted PDF document from the file system, a stream, or a byte array using the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument__ctor_System_Byte___System_String_System_Boolean_) class, as shown below. The `OpenAndRepair` constructor enables repair mode so that the library can attempt to recover the document's structure. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing corrupted PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an existing corrupted PDF document from a file path through the `PdfLoadedDocument` constructor (OpenAndRepair overload). PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"Input.pdf", true); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing corrupted document from disk. +//Open an existing corrupted document from the file system. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf", true); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing corrupted document from disk. +'Open an existing corrupted document from the file system. Dim loadedDocument As New PdfLoadedDocument("Input.pdf", True) {% endhighlight %} @@ -233,7 +234,7 @@ Dim loadedDocument As New PdfLoadedDocument("Input.pdf", True) {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing corrupted PDF document from stream through constructor of `PdfLoadedDocument` class. +//Open an existing corrupted PDF document from a stream through the `PdfLoadedDocument` constructor (OpenAndRepair overload). FileStream inputPDFStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, true); @@ -241,14 +242,14 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, true); {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing corrupted document from stream. +//Open an existing corrupted document from a stream. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFStream, true); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing corrupted document from stream. +'Open an existing corrupted document from a stream. Dim loadedDocument As New PdfLoadedDocument(inputPDFStream, True) {% endhighlight %} @@ -259,26 +260,27 @@ Dim loadedDocument As New PdfLoadedDocument(inputPDFStream, True) {% highlight c# tabtitle="C# [Cross-platform]" %} -//Open an existing corrupted document from byte array. +//Open an existing corrupted document from a byte array. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray, true); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -//Open an existing corrupted document from byte array. +//Open an existing corrupted document from a byte array. PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPDFByteArray, true); {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -'Open an existing corrupted document from byte array. +'Open an existing corrupted document from a byte array. Dim loadedDocument As New PdfLoadedDocument(inputPDFByteArray, True) {% endhighlight %} {% endtabs %} -N> 1. The OpenAndRepair overload is capable of resolving basic cross reference offset issues and cannot repair complex document corruption. -N> 2. Using this overload may cause performance delay when compared with other overloads, due to the repairing process. \ No newline at end of file +N> 1. The OpenAndRepair overload can resolve basic cross-reference offset issues and cannot repair complex document corruption. +N> 2. Using this overload may cause a performance delay when compared with other overloads, due to the repair process. +N> 3. If the document is encrypted, supply the password as an additional constructor argument: `new PdfLoadedDocument("Input.pdf", "password", true)`. \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Library/NET/PdfGrid.md b/Document-Processing/PDF/PDF-Library/NET/PdfGrid.md index c92e80c577..3e350fa3ba 100644 --- a/Document-Processing/PDF/PDF-Library/NET/PdfGrid.md +++ b/Document-Processing/PDF/PDF-Library/NET/PdfGrid.md @@ -965,7 +965,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Table customization -The Syncfusion .NET PDF library supports users to create a customizable PDF table like [CellSpacing](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_CellSpacing), [CellPadding](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_CellPadding), [HorizontalOverflow](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_AllowHorizontalOverflow), etc. using [PdfGridStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html) class. +The .NET PDF library supports users to create a customizable PDF table like [CellSpacing](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_CellSpacing), [CellPadding](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_CellPadding), [HorizontalOverflow](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html#Syncfusion_Pdf_Grid_PdfGridStyle_AllowHorizontalOverflow), etc. using [PdfGridStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyle.html) class. Check the following video on creating a custom table in a PDF using the .NET PDF Library. {% youtube "https://youtu.be/BT-fRY4ZpO0?si=R3rAD_aqFYRBCGwh" %} @@ -1825,7 +1825,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## String formatting -The Syncfusion® .NET PDF library supports applying string formatting for a whole table, a column in a table, a row in a table, and a cell in a table using the [PdfStingFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfStringFormat.html) class. +The .NET PDF library supports applying string formatting for a whole table, a column in a table, a row in a table, and a cell in a table using the [PdfStingFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfStringFormat.html) class. ### String formatting for the whole table @@ -2669,7 +2669,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Table cell Styles -The Syncfusion® .NET PDF library allows you to add different styles like change the background color using [BackgroundBrush](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyleBase.html#Syncfusion_Pdf_Grid_PdfGridStyleBase_BackgroundBrush), add the background image using [BackgroundImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_BackgroundImage), add borders using [Borders](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_Borders) in [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html). Also we can add cell dimension by setting row [Height](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridRow.html#Syncfusion_Pdf_Grid_PdfGridRow_Height), and column [Width](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridColumn.html#Syncfusion_Pdf_Grid_PdfGridColumn_Width) in PDF table along with spanning through the [RowSpan](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCell.html#Syncfusion_Pdf_Grid_PdfGridCell_RowSpan) and [ColumnSpan](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCell.html#Syncfusion_Pdf_Grid_PdfGridCell_ColumnSpan). +The .NET PDF library allows you to add different styles like change the background color using [BackgroundBrush](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridStyleBase.html#Syncfusion_Pdf_Grid_PdfGridStyleBase_BackgroundBrush), add the background image using [BackgroundImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_BackgroundImage), add borders using [Borders](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_Borders) in [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html). Also we can add cell dimension by setting row [Height](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridRow.html#Syncfusion_Pdf_Grid_PdfGridRow_Height), and column [Width](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridColumn.html#Syncfusion_Pdf_Grid_PdfGridColumn_Width) in PDF table along with spanning through the [RowSpan](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCell.html#Syncfusion_Pdf_Grid_PdfGridCell_RowSpan) and [ColumnSpan](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCell.html#Syncfusion_Pdf_Grid_PdfGridCell_ColumnSpan). The following code sample explains how to add different cell styles to a cell in the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html). @@ -2916,7 +2916,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Table row style -The Syncfusion® .NET PDF library supports applying different styles to a row in the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html) by using the [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html) and [PdfGridRow](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridRow.html) instances. The following code sample explains this. +The .NET PDF library supports applying different styles to a row in the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html) by using the [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html) and [PdfGridRow](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridRow.html) instances. The following code sample explains this. {% tabs %} @@ -3288,7 +3288,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Word wrap -The Syncfusion® .NET PDF library supports word wrapping in the table cell by setting the [WordWrap](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfStringFormat.html#Syncfusion_Pdf_Graphics_PdfStringFormat_WordWrap) property to ``Word`` of the [PdfWordWrapType](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfWordWrapType.html) Enum. It also supports the ``Character`` and ``WordOnly`` text wrapping. +The .NET PDF library supports word wrapping in the table cell by setting the [WordWrap](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfStringFormat.html#Syncfusion_Pdf_Graphics_PdfStringFormat_WordWrap) property to ``Word`` of the [PdfWordWrapType](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfWordWrapType.html) Enum. It also supports the ``Character`` and ``WordOnly`` text wrapping. The following code sample explains how to apply word wrap in the PDF table cell. @@ -3621,7 +3621,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Draw HTML styled text -The Syncfusion® .NET PDF library provides support to render HTML string in the PDF table cell using the [PdfHTMLTextElement](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfHTMLTextElement.html) class. +The .NET PDF library provides support to render HTML string in the PDF table cell using the [PdfHTMLTextElement](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfHTMLTextElement.html) class. * The PdfHTMLTextElement class provides support for a basic set of HTML tags, to render the HTML format text in the PDF document. @@ -3930,7 +3930,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Add different font styles for particular table cell -The Syncfusion® .NET PDF library supports adding of different font styles for a particular table cell using the [BeginCellLayout](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html#Syncfusion_Pdf_Grid_PdfGrid_BeginCellLayout) event in the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html) class. +The .NET PDF library supports adding of different font styles for a particular table cell using the [BeginCellLayout](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html#Syncfusion_Pdf_Grid_PdfGrid_BeginCellLayout) event in the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html) class. The following code illustrates how to create a table with different font styles for a particular table cell using the ``PdfGrid.`` @@ -4296,7 +4296,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Draw border less table -The Syncfusion® .NET PDF library allows you to draw border less tables by setting the ``Transparent`` color to all [Borders](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_Borders) property of the [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html). Also change or remove the border of either side of the table cell. +The .NET PDF library allows you to draw border less tables by setting the ``Transparent`` color to all [Borders](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html#Syncfusion_Pdf_Grid_PdfGridCellStyle_Borders) property of the [PdfGridCellStyle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGridCellStyle.html). Also change or remove the border of either side of the table cell. The following code sample illustrates how to draw a border less table in a PDF document using the [PdfGrid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Grid.PdfGrid.html). diff --git a/Document-Processing/PDF/PDF-Library/NET/Save-PDF-file.md b/Document-Processing/PDF/PDF-Library/NET/Save-PDF-file.md index 0729743ab1..e8b37aefcc 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Save-PDF-file.md +++ b/Document-Processing/PDF/PDF-Library/NET/Save-PDF-file.md @@ -7,8 +7,9 @@ documentation: UG --- # Save PDF file in C# and VB.NET -## Namespace required -The following namespaces of Essential® PDF need to be included in your application to save the PDF document. +## Namespaces required + +The following namespace of the Essential® PDF library must be included in your application to save a PDF document. {% tabs %} @@ -32,9 +33,9 @@ Imports Syncfusion.Pdf.Parsing {% endtabs %} -## Saving a PDF document to file system +## Saving a PDF document to the file system -You can save the manipulated PDF document to file system using [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method of [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class. +You can save the manipulated PDF document to the file system using the [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method of the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class. {% tabs %} @@ -43,8 +44,8 @@ You can save the manipulated PDF document to file system using [Save](https://he //Load an existing PDF document. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf"); //To-Do some manipulation -//Save the document in file system. -loadedDocument.Save("Output.pdf"); +//Save the document to the file system. +loadedDocument.Save("Output.pdf"); {% endhighlight %} @@ -53,8 +54,8 @@ loadedDocument.Save("Output.pdf"); //Load an existing PDF document. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf"); //To-Do some manipulation -//Save the document in file system. -loadedDocument.Save("Output.pdf"); +//Save the document to the file system. +loadedDocument.Save("Output.pdf"); {% endhighlight %} @@ -63,16 +64,16 @@ loadedDocument.Save("Output.pdf"); 'Load an existing PDF document. Dim loadedDocument As New PdfLoadedDocument("Input.pdf") 'To-Do some manipulation -'Save the document in file system. +'Save the document to the file system. loadedDocument.Save("Output.pdf") {% endhighlight %} {% endtabs %} -## Saving a PDF document to stream +## Saving a PDF document to a stream -You can also save the manipulated PDF document to stream using overloads of [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method. +You can also save the manipulated PDF document to a stream using the overloads of the [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method. {% tabs %} @@ -96,7 +97,7 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf"); //Creates an instance of memory stream. MemoryStream stream = new MemoryStream(); //Save the document stream. -loadedDocument.Save(stream) ; +loadedDocument.Save(stream); {% endhighlight %} @@ -116,7 +117,7 @@ loadedDocument.Save(stream) ## Saving a PDF document into the same file or stream -You can also resave the manipulated PDF document to the same file using overloads of [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method. +You can also resave the manipulated PDF document to the same file using the overloads of the [Save](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Save) method. {% tabs %} @@ -188,7 +189,7 @@ loadedDocument.Save() ## Closing a document -After the document manipulation and save operation are completed, you should close the instance of [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html), in order to release all the memory consumed by PDF DOM. The following code snippet illustrates how to [Close](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Close_System_Boolean_) a ```PdfLoadedDocument``` instance. +After the document manipulation and save operations are completed, you should close the instance of [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) to release all the memory consumed by the PDF DOM. The following code snippet illustrates how to [Close](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Close_System_Boolean_) a `PdfLoadedDocument` instance. {% tabs %} @@ -210,8 +211,8 @@ loadedDocument.Close(true); //Load an existing PDF document. PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf"); //To-Do some manipulation -//Save the document in file system. -loadedDocument.Save("Output.pdf"); +//Save the document to the file system. +loadedDocument.Save("Output.pdf"); //Close the document. loadedDocument.Close(true); @@ -222,7 +223,7 @@ loadedDocument.Close(true); 'Load an existing PDF document. Dim loadedDocument As New PdfLoadedDocument("Input.pdf") 'To-Do some manipulation -'Save the document in file system. +'Save the document to the file system. loadedDocument.Save("Output.pdf") 'Close the document. loadedDocument.Close(True) @@ -231,12 +232,13 @@ loadedDocument.Close(True) {% endtabs %} -N> 1. Close() method will dispose all the memory consumed by PDF DOM. -N> 2. [Close(true)](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Close_System_Boolean_) method will dispose all the memory consumed by PDF DOM as well as disposes its document stream. +N> 1. The `Close()` method disposes all the memory consumed by the PDF DOM. +N> 2. The [Close(true)](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html#Syncfusion_Pdf_Parsing_PdfLoadedDocument_Close_System_Boolean_) method disposes all the memory consumed by the PDF DOM and also disposes the underlying document stream. +N> 3. Always call `Close()` (or wrap the document in a `using` block) to prevent memory leaks and locked file handles. -## Secured documents exception +## Secured document exception -You can catch the secured document exception by opening an existing encrypted PDF document from either the file system, stream, or byte array using the following code sample as follows. +You can catch the exception thrown when opening an existing encrypted PDF document from the file system, a stream, or a byte array using the following code samples. {% tabs %} @@ -270,14 +272,13 @@ try } catch (Syncfusion.Pdf.PdfInvalidPasswordException exception) { - //Secured PDF document password is invalid or opened without a password. + //The secured PDF document password is invalid or the document was opened without a password. } //Save the document. document.Save("Output.pdf"); //Close the document. document.Close(true); - {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} @@ -287,7 +288,7 @@ Try 'Load an existing PDF document. document = New PdfLoadedDocument("Input.pdf", "password") Catch exception As Syncfusion.Pdf.PdfInvalidPasswordException - 'Secured PDF document password is invalid or opened without a password. + 'The secured PDF document password is invalid or the document was opened without a password. End Try 'Save the document. document.Save("Output.pdf") @@ -299,18 +300,21 @@ document.Close(True) {% endtabs %} ## Possible error messages of invalid PDF documents while loading -The following are the possible error messages of invalid PDF documents while loading: -I. Please find some of the following corrupted error messages that cannot be repaired: -1. Could not find a valid signature (%PDF-). -2. Bad Format error. -3. Lexical Error: Unmatched Input. -4. The document does not contain EOF. -5. The document has corrupted cross reference tables. -6. Error: Bad input stream initializer. -7. Fatal Error occurred. -II. Please find some of the possible offset error messages that may be repairable: - 1.Invalid cross-reference table with offset position. - 2.Trailer Prev offset is located in the same cross table section. + +The following are the possible error messages that can occur when loading an invalid PDF document: + +I. **Corruption errors that cannot be repaired:** +1. Could not find a valid signature (%PDF-). +2. Bad Format error. +3. Lexical Error: Unmatched Input. +4. The document does not contain EOF. +5. The document has corrupted cross reference tables. +6. Error: Bad input stream initializer. +7. Fatal Error occurred. + +II. **Offset errors that may be repairable (handled by the OpenAndRepair overload):** +1. Invalid cross-reference table with offset position. +2. Trailer Prev offset is located in the same cross table section. {% tabs %} @@ -352,7 +356,7 @@ try //Open an existing PDF document from the disk. document = new PdfLoadedDocument("Input.pdf", true); } -catch (Exception message) +catch (Exception exception) { //Invalid cross-reference table with offset position //Trailer Prev offset is located in the same cross table section @@ -362,11 +366,11 @@ catch (Exception message) //The document does not contain EOF //The document has corrupted cross reference tables //Error: Bad input stream initializer - //Fatal error occured + //Fatal error occurred } -//Save the document. +//Save the document. document.Save("Output.pdf"); -//Close the document. +//Close the document. document.Close(true); {% endhighlight %} @@ -376,7 +380,7 @@ document.Close(true); Dim document As PdfLoadedDocument = Nothing Try 'Load an existing document. - document = New PdfLoadedDocument("Input.pdf",true) + document = New PdfLoadedDocument("Input.pdf", true) Catch exception As Exception 'Invalid cross-reference table with offset position 'Trailer Prev offset is located in the same cross table section @@ -386,7 +390,7 @@ Catch exception As Exception 'The document does not contain EOF 'The document has corrupted cross reference tables 'Error: Bad input stream initializer - 'Fatal error occured + 'Fatal error occurred End Try 'Save the document. document.Save("Output.pdf") diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md index 9bf8b2b4d7..6044580799 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md @@ -7,12 +7,12 @@ documentation: UG --- # Working with Digital Signature -To quickly get started with digitally signing a PDF document and validating signatures using the Blazor PDF Library, check this video: +To quickly get started with digitally signing a PDF document and validating signatures using the .NET PDF Library, check this video: {% youtube "https://www.youtube.com/watch?v=NNIFh1Ckdzw&t=672s" %} ## Adding a digital signature -The Essential® PDF allows you to add a [digital signature](https://www.syncfusion.com/document-processing/pdf-framework/net/pdf-library/digital-signature-pdf) to the PDF document. To add a digital signature, you need a certificate with private keys. The Essential® PDF provides support for digital signature by using the PFX files, Hardware Security Module (HSM), Online Certificate Status Protocol (OCSP), Certificate Revocation List (CRL), Windows Certificate Store, and supports signatures using the Elliptic Curve Digital Signature Algorithm (ECDSA). +Essential® PDF enables you to add a [digital signature](https://www.syncfusion.com/document-processing/pdf-framework/net/pdf-library/digital-signature-pdf) to a PDF document. To add a digital signature, you need a certificate with a private key. Essential® PDF supports digital signatures by using PFX files, Hardware Security Module (HSM), Online Certificate Status Protocol (OCSP), Certificate Revocation List (CRL), the Windows Certificate Store, and the Elliptic Curve Digital Signature Algorithm (ECDSA). The following code example explains how to add a digital signature to the PDF document by using [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. @@ -131,9 +131,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Add-a-digital-signature-to-the-PDF-document/). -## Adding a digital signature using stream +## Adding a digital signature using a stream -The following code example illustrates how to add a digital signature in the PDF document as stream using the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class as follows. +The following code example illustrates how to add a digital signature in a PDF document as a stream using the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. {% tabs %} @@ -351,7 +351,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Adding a digital signature using X509Certificate2 -The following code example illustrates how to add digital signature in a PDF document using [X509Certificate2](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate__ctor_System_Security_Cryptography_X509Certificates_X509Certificate2_) as follows. +The following code example illustrates how to add a digital signature to a PDF document using [X509Certificate2](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate__ctor_System_Security_Cryptography_X509Certificates_X509Certificate2_). {% tabs %} @@ -476,7 +476,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Signing an existing document -You can load the signature field from the existing PDF document using [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class and add certificate to the document using [PdfCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html) class. +You can load the signature field from an existing PDF document using the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class and add a certificate to the document using the [PdfCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html) class. {% tabs %} @@ -557,9 +557,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Signing-an-existing-PDF-document/). -## Sign an existing document using stream +## Sign an existing document using a stream -You can load the signature field from an existing PDF document using [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class and add certificate to the document as stream using [PdfCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html) as follows. +You can load the signature field from an existing PDF document using the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class and add a certificate to the document as a stream using the [PdfCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html) class. {% tabs %} @@ -646,7 +646,7 @@ loadedDocument.Close(True) The [IsSigned](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html#Syncfusion_Pdf_Parsing_PdfLoadedSignatureField_IsSigned) property in the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class allows you to determine whether a signature field in a PDF document has been signed. -The following code example demonstrates how to check if a signature field is signed. +The following code example demonstrates how to check whether a signature field is signed. {% tabs %} @@ -755,9 +755,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Check-If-PDF-Is-Signed/.NET). -## Externally sign a PDF document +## Externally sign a PDF document -You can sign the PDF document with an external digital signature created from various sources, such as an HSM, USB token, smart card, or other cloud services such as DigitalSign. The following approaches are available for externally signing the PDF documents. +You can sign a PDF document with an external digital signature created from various sources, such as an HSM, USB token, smart card, or other cloud services such as DigitalSign. The following approaches are available for externally signing PDF documents. * [ComputeHash](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_ComputeHash) event * [IPdfExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_ComputeHash) interface @@ -1099,11 +1099,11 @@ N> When implementing `IPdfExternalSigner`, ensure that the hashing and signing a You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Externally-sign-the-PDF-document-using-IPdfExternalSigner/). -## Adding Timestamps to a PDF document using external signing +## Adding timestamps to a PDF document using external signing -This section explains how to add a timestamp to a PDF document during the external signing process. We have implemented a solution that generates a timestamp response from a timestamp server URI using the [BouncyCastle](https://www.nuget.org/packages/Portable.BouncyCastle) library. The accepted timestamp token follows the RFC3161 standard. +This section explains how to add a timestamp to a PDF document during the external signing process. The following solution generates a timestamp response from a timestamp server URI using the [BouncyCastle](https://www.nuget.org/packages/Portable.BouncyCastle) library. The accepted timestamp token follows the RFC3161 standard. -N> In this example, we have used the open-source [BouncyCastle](https://www.nuget.org/packages/Portable.BouncyCastle) library. Ensure you review its licensing before including it in your production environment. Alternatively, you can directly use the timestamp token provided by your service provider. +N> This example uses the open-source [BouncyCastle](https://www.nuget.org/packages/Portable.BouncyCastle) library. Ensure you review its licensing before including it in your production environment. Alternatively, you can directly use the timestamp token provided by your service provider. The following example illustrates the process of adding timestamps to a PDF document during the external signing process. @@ -1480,7 +1480,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Create Long Term Validation (LTV) when signing PDF documents externally -You can create a Long Term validation (LTV) when signing PDF documents externally using your private/public certificates.The following code example shows how to create an LTV when signing a PDF document from external signature using [CreateLongTermValidity](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_CreateLongTermValidity_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__) method in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. +You can create Long Term Validation (LTV) when signing PDF documents externally using your private/public certificates. The following code example shows how to create LTV when signing a PDF document from an external signature using the [CreateLongTermValidity](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_CreateLongTermValidity_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__) method in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. {% tabs %} @@ -1687,9 +1687,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync The PDF LTA signature is the next level of the LTV signature. It follows the standard PAdES B-LTA. According to the standard, the validation-related information of the timestamp is added to the DSS along with other signature information mentioned in the LTV signature. -The document timestamp is also applied to the PDF document, so it provides more viability to the signature. This level is recommended for qualified electronic signatures. +A document timestamp is also applied to the PDF document, which provides additional validity to the signature. This level is recommended for qualified electronic signatures. -The following code example shows how to sign a PDF document with LTA using [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property and [EnableLtv](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableLtv) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. +The following code example shows how to sign a PDF document with LTA using the [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property and the [EnableLtv](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableLtv) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. {% tabs %} @@ -1822,9 +1822,9 @@ N> To avoid this, increase the [EstimatedSignatureSize](https://help.syncfusion. ## Digitally sign a PDF document using the Windows certificate store -A Windows certificate store is a secure way to store the digital ID. If a root certificate is added to the Windows certificate store, you do not need to manually add and trust each of the certificates that are already present in the Windows certificate store. +A Windows certificate store is a secure way to store a digital ID. If a root certificate is added to the Windows certificate store, you do not need to manually add and trust each of the certificates that are already present in the Windows certificate store. -You can retrieve the digital ID [X509Certificate2](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate__ctor_System_Security_Cryptography_X509Certificates_X509Certificate2_) from the Windows certificate store X509Store and use it to add a digital signature to a PDF document using [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. +You can retrieve the digital ID [X509Certificate2](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate__ctor_System_Security_Cryptography_X509Certificates_X509Certificate2_) from the Windows certificate store `X509Store` and use it to add a digital signature to a PDF document using the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example shows how to create a PDF digital signature using the Windows certificate store. @@ -1932,9 +1932,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Sign_PDF_Windows_Certificate/). -## Adding a signature validation appearance based on the signature +## Adding a signature validation appearance based on the signature -You can add the dynamic signature validation appearance to the signature field by enabling the [EnableValidationAppearance](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableValidationAppearance) property available in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class, the appearance will change based on the PDF reader validation. +You can add a dynamic signature validation appearance to the signature field by enabling the [EnableValidationAppearance](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableValidationAppearance) property available in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The appearance will change based on the PDF reader validation. Refer to the following code sample. @@ -2058,9 +2058,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Adding-a-signature-validation-appearance-in-a-PDF/). -## Adding a timestamp in digital signature +## Adding a timestamp in a digital signature -Essential® PDF allows you to add timestamp in the digital signature of the PDF document using [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example explains the same. +Essential® PDF enables you to add a timestamp to the digital signature of a PDF document using the [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example demonstrates the same. {% tabs %} @@ -2186,9 +2186,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Adding-a-timestamp-in-digital-signature-of-PDF/). -## Adding a timestamp to PDF document +## Adding a timestamp to a PDF document -You can add timestamp to the PDF document using [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example explains the same. +You can add a timestamp to a PDF document using the [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example demonstrates the same. {% tabs %} @@ -2260,9 +2260,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Adding-a-timestamp-to-PDF-document/). -## Adding a timestamp to existing PDF document +## Adding a timestamp to an existing PDF document -You can add timestamp to the existing PDF document using [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example explains the same. +You can add a timestamp to an existing PDF document using the [TimeStampServer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_TimeStampServer) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. The following code example demonstrates the same. {% tabs %} @@ -2340,7 +2340,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Retrieve certificate details from an existing signed PDF document -The Essential® PDF provides support to get the certificate details from an existing signed PDF document such as, +Essential® PDF supports retrieving the following certificate details from an existing signed PDF document: * [Signed date](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_SignedDate) * Expiry date @@ -2349,7 +2349,7 @@ The Essential® PDF provides support to get the certificate detail * [Issuer name](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_IssuerName) * Certificate distinguished names (country, state, street, email, organization, organization unit, locality, and more). -You can get the above certificate details from an existing signed PDF document using [ValidFrom](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidFrom) and [ValidTo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidTo) property.The following code example explains the same. +You can retrieve the certificate details from an existing signed PDF document using the [ValidFrom](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidFrom) and [ValidTo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidTo) properties. The following code example demonstrates the same. {% tabs %} @@ -2458,11 +2458,11 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Enable Long Term Validation (LTV) PDF signature -The Essential® PDF supports creating long term signature validation when signing the PDF document. The LTV signature allows you to check the validity of a signature long after the document was signed. To achieve long term validation, all the required elements for signature validation must be embedded in the signed PDF. +Essential® PDF supports creating long-term signature validation when signing a PDF document. The LTV signature allows you to check the validity of a signature long after the document was signed. To achieve long-term validation, all the required elements for signature validation must be embedded in the signed PDF. -N> The resulted PDF document size will be large since all the necessary signature information, Certificate Revocation List (CRL), and Online Certificate Status Protocol (OCSP) are embedded. +N> The resulting PDF document size will be large since all the necessary signature information, Certificate Revocation List (CRL), and Online Certificate Status Protocol (OCSP) are embedded. -The following code example explains how to create LTV PDF using [EnableLtv](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableLtv) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class when signing the PDF document. +The following code example explains how to create an LTV PDF using the [EnableLtv](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EnableLtv) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class when signing the PDF document. {% tabs %} @@ -2614,13 +2614,13 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Adding a digital signature with customization -The [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html) allows you to add customized digital signatures to the PDF document. +The [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html) enables you to add customized digital signatures to the PDF document. ### Adding a digital signature with CAdES format -As per the PDF specification 2.0, now Syncfusion PDF library supports digital signature based on CAdES (CMS Advanced Electronics Signature). The CAdES based digital signature can remain valid for long periods, even if underlying cryptographic algorithms are broken. Using the API [CryptographicStandard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_CryptographicStandard), you can change the standard between CMS (Cryptographic Message Syntax) and CAdES. +As per PDF specification 2.0, the Syncfusion PDF library now supports digital signatures based on CAdES (CMS Advanced Electronic Signatures). CAdES-based digital signatures can remain valid for long periods, even if the underlying cryptographic algorithms are broken. Using the [CryptographicStandard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_CryptographicStandard) API, you can change the standard between CMS (Cryptographic Message Syntax) and CAdES. -The following code example explains how to add a digital signature with [cryptographic standard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_CryptographicStandard) as CAdES through [CryptographicStandard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.CryptographicStandard.html) Enum when creating the PDF document. +The following code example explains how to add a digital signature with the [cryptographic standard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_CryptographicStandard) set to CAdES through the [CryptographicStandard](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.CryptographicStandard.html) enum when creating the PDF document. {% tabs %} @@ -2749,9 +2749,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Adding-a-digital-signature-with-CAdES-format/). -### Customize digestion algorithm +### Customizing the digest algorithm -In addition, you can now set the different message digest algorithm to sign PDF document using the [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_DigestAlgorithm) enum available in the class [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html). +In addition, you can now set a different message digest algorithm to sign the PDF document using the [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_DigestAlgorithm) enum available in the [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html) class. The following message digest algorithms are now supported: * SHA1 @@ -2760,7 +2760,7 @@ The following message digest algorithms are now supported: * SHA512 * RIPEMD160 -The following code example explains how to add a digital signature with various digest algorithms to the PDF document by specifying the [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_DigestAlgorithm) property as **SHA256** through [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.DigestAlgorithm.html) enum in [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html) class. +The following code example explains how to add a digital signature with various digest algorithms to the PDF document by specifying the [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html#Syncfusion_Pdf_Security_PdfSignatureSettings_DigestAlgorithm) property as **SHA256** through the [DigestAlgorithm](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.DigestAlgorithm.html) enum in the [PdfSignatureSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureSettings.html) class. {% tabs %} @@ -2891,19 +2891,19 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Digital signature validation -Added the support to validate the digital signatures in an existing PDF document. Digital signature validation covers the following steps to ensure the validity of the signatures: +Added support to validate the digital signatures in an existing PDF document. Digital signature validation covers the following steps to ensure the validity of the signatures: * Validate the document modification. * Validate the certificate chain. -* Ensure the signature with timestamp time. +* Ensure the signature with timestamp. * Check the revocation status of the certificate with OCSP and CRL. * Ensure the multiple digital signatures. -You can use the [ValidateSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html#Syncfusion_Pdf_Parsing_PdfLoadedSignatureField_ValidateSignature) method available in the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class to validate the digital signature. +You can use the [ValidateSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html#Syncfusion_Pdf_Parsing_PdfLoadedSignatureField_ValidateSignature) method available in the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class to validate the digital signature. You can get the overall status from the [IsSignatureValid](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureValidationResult.html#Syncfusion_Pdf_Security_PdfSignatureValidationResult_IsSignatureValid) property available in the [PdfSignatureValidationResult](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureValidationResult.html) class. -The following code example explains how to validate the digitally signed PDF document signature. +The following code example explains how to validate a digitally signed PDF document. {% tabs %} @@ -3305,13 +3305,13 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Validate-the-digitally-signed-PDF-signature/). -### Validate all signatures in PDF document +### Validate all signatures in a PDF document -Added the support to validate all the digital signatures in an existing PDF document. +Added support to validate all the digital signatures in an existing PDF document. You can use the [ValidateSignatures](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.html#Syncfusion_Pdf_Parsing_PdfLoadedFormFieldCollection_ValidateSignatures_Syncfusion_Pdf_Parsing_PdfSignatureValidationOptions_System_Collections_Generic_List_Syncfusion_Pdf_Security_PdfSignatureValidationResult___) method available in the [PdfLoadedFormFieldCollection](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.html) class to validate all the digital signatures. You can get the list of [PdfSignatureValidationResult](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureValidationResult.html) from the [ValidateSignatures](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.html#Syncfusion_Pdf_Parsing_PdfLoadedFormFieldCollection_ValidateSignatures_Syncfusion_Pdf_Parsing_PdfSignatureValidationOptions_System_Collections_Generic_List_Syncfusion_Pdf_Security_PdfSignatureValidationResult___) method. -The following code example explains how to validate all the signatures in digitally signed PDF document. +The following code example explains how to validate all the signatures in a digitally signed PDF document. {% tabs %} @@ -3397,9 +3397,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Validate and classify digital signatures in a PDF document -It checks each signature field in the PDF to determine if it’s a timestamp, LTV (Long-Term Validation), or LTA (Long-Term Archival) signature. It also identifies the cryptographic standard used, such as CAdES, and prints the results to the console. +It checks each signature field in the PDF to determine if it is a timestamp, LTV (Long-Term Validation), or LTA (Long-Term Archival) signature. It also identifies the cryptographic standard used, such as CAdES, and prints the results to the console. -This example shows how to validate and identify different types of digital signatures in a PDF using C#. +This example shows how to validate and identify different types of digital signatures in a PDF using C# and VB.NET. {% tabs %} @@ -3616,9 +3616,9 @@ Next You can download a complete working sample from GitHub. -## Deferred signing in PDF document +## Deferred signing in a PDF document -The following code sample shows how to be deferred signing in a PDF document from an external signature using [IPdfExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.IPdfExternalSigner.html) class and [AddExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_AddExternalSigner_Syncfusion_Pdf_Security_IPdfExternalSigner_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Byte___) method in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html). +The following code sample shows how to perform deferred signing in a PDF document from an external signature using the [IPdfExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.IPdfExternalSigner.html) class and the [AddExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_AddExternalSigner_Syncfusion_Pdf_Security_IPdfExternalSigner_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Byte___) method in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. Steps for deferred signing: 1. Create a PDF document with an empty signature. @@ -3981,7 +3981,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Adding the estimated size of the signature -The following code sample shows how to add the estimated size of the signature in the PDF document using [EstimatedSignatureSize](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EstimatedSignatureSize) property. +The following code sample shows how to add the estimated size of the signature in a PDF document using the [EstimatedSignatureSize](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_EstimatedSignatureSize) property. {% tabs %} @@ -4070,7 +4070,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Deferred signing without PKCS7 encoding -The following code sample shows deferred signing in a PDF document without PKCS7 encoding from an external signature using [IPdfExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.IPdfExternalSigner.html) class and [AddExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_AddExternalSigner_Syncfusion_Pdf_Security_IPdfExternalSigner_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Byte___) method. +The following code sample shows deferred signing in a PDF document without PKCS7 encoding from an external signature using the [IPdfExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.IPdfExternalSigner.html) class and the [AddExternalSigner](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_AddExternalSigner_Syncfusion_Pdf_Security_IPdfExternalSigner_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Byte___) method. Steps for deferred signing: 1. Create a PDF document with an empty signature. @@ -4364,9 +4364,9 @@ End Class {% endtabs %} -## Drawing text/image in the Signature Appearance +## Drawing text/image in the signature appearance -The following code example illustrates how to draw text/images in a digital appearance using [Appearance](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_Appearance) property and [DrawImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfGraphics.html#Syncfusion_Pdf_Graphics_PdfGraphics_DrawImage_Syncfusion_Pdf_Graphics_PdfImage_System_Drawing_PointF_) method as follows. +The following code example illustrates how to draw text/images in a digital signature appearance using the [Appearance](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_Appearance) property and the [DrawImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfGraphics.html#Syncfusion_Pdf_Graphics_PdfGraphics_DrawImage_Syncfusion_Pdf_Graphics_PdfImage_System_Drawing_PointF_) method. {% tabs %} @@ -4483,7 +4483,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Long Term Validation (LTV) information -Added support for LTV validation and getting CRL and OCSP embedded details from the digital signature using [LtvVerificationInfo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureValidationResult.html#Syncfusion_Pdf_Security_PdfSignatureValidationResult_LtvVerificationInfo) class. +Added support for LTV validation and retrieving CRL and OCSP embedded details from the digital signature using the [LtvVerificationInfo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignatureValidationResult.html#Syncfusion_Pdf_Security_PdfSignatureValidationResult_LtvVerificationInfo) class. {% tabs %} @@ -4598,7 +4598,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Customized revocation validation -Added support to customize revocation validation using [PdfSignatureValidationOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfSignatureValidationOptions.html). +Added support to customize revocation validation using the [PdfSignatureValidationOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfSignatureValidationOptions.html) class. {% tabs %} @@ -4711,9 +4711,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Customized-revocation-validation/). -## Remove existing digital signatures from a PDF document +## Remove existing digital signatures from a PDF document -The following code example illustrates how to remove existing digital signatures from a PDF document using [Remove](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfFieldCollection.html#Syncfusion_Pdf_Interactive_PdfFieldCollection_Remove_Syncfusion_Pdf_Interactive_PdfField_) method in [PdfLoadedFormFieldCollection](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.html) class. +The following code example illustrates how to remove existing digital signatures from a PDF document using the [Remove](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfFieldCollection.html#Syncfusion_Pdf_Interactive_PdfFieldCollection_Remove_Syncfusion_Pdf_Interactive_PdfField_) method in the [PdfLoadedFormFieldCollection](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.html) class. {% tabs %} @@ -4775,9 +4775,9 @@ pdfLoadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Remove_existing_digital_signature_from_PDF/). -## Certified signature +## Certified signature -The following code snippet illustrates how to sign a PDF document without showing the digital signature using [Certificated](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_Certificated) property in [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. +The following code snippet illustrates how to sign a PDF document without showing the digital signature using the [Certificated](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_Certificated) property in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. {% tabs %} @@ -4860,9 +4860,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Sign-PDF-without-showing-digital-signature/). -## Retrieve digital signature information from an existing PDF document +## Retrieve digital signature information from an existing PDF document -The following code snippet illustrates how to retrieve digital signature information from an existing PDF document using [IssuerName](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_IssuerName), [ValidFrom](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidFrom), and [ValidTo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidTo) property. +The following code snippet illustrates how to retrieve digital signature information from an existing PDF document using the [IssuerName](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_IssuerName), [ValidFrom](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidFrom), and [ValidTo](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfCertificate.html#Syncfusion_Pdf_Security_PdfCertificate_ValidTo) properties. {% tabs %} @@ -4944,9 +4944,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Adding multiple signatures to a PDF document -The following code example illustrates how to add multiple signatures to a PDF document without invalidating the previous signature. +The following code example illustrates how to add multiple signatures to a PDF document without invalidating the previous signature. -N> It is recommended to use licensed assemblies or registered license keys in your respective applications to add multiple digital signatures to the PDF documents without invalidating the previous signatures. +N> It is recommended to use licensed assemblies or registered license keys in your respective applications to add multiple digital signatures to the PDF documents without invalidating the previous signatures. {% tabs %} @@ -5100,9 +5100,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Multiple-digital-signature/). -## Retrieve revocation certificate information from digital signature +## Retrieve revocation certificate information from a digital signature -The following code example illustrates how to retrieve revocation certificate information from digital signature using [PdfSignerCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignerCertificate.html). +The following code example illustrates how to retrieve revocation certificate information from a digital signature using [PdfSignerCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignerCertificate.html). {% tabs %} @@ -5272,9 +5272,9 @@ loadedDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Digital%20Signature/Retrieve-revocation-certificate-information). -## Retrieve signed revision information from digital signature +## Retrieve signed revision information from a digital signature -The following code example illustrates how to retrieve signed revision information from digital signature using [Revision](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html#Syncfusion_Pdf_Parsing_PdfLoadedSignatureField_Revision) property of [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html). +The following code example illustrates how to retrieve signed revision information from a digital signature using the [Revision](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html#Syncfusion_Pdf_Parsing_PdfLoadedSignatureField_Revision) property of [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html). {% tabs %} @@ -5348,7 +5348,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Retrieve revocation certificate information from digital signature embed timestamp -The following code example illustrates how to retrieve revocation certificate information from digital signature embed timestamp using [PdfSignerCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignerCertificate.html). +The following code example illustrates how to retrieve revocation certificate information from a digital signature embed timestamp using [PdfSignerCertificate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignerCertificate.html). {% tabs %} @@ -5415,7 +5415,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Get images from the existing signed signature field -Utilize the **GetImages** method within the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class to obtain images from the appearance of an existing signed signature field. The following code example provides a clear demonstration of this functionality. +Use the `GetImages` method within the [PdfLoadedSignatureField](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedSignatureField.html) class to obtain images from the appearance of an existing signed signature field. The following code example provides a demonstration of this functionality. {% tabs %} @@ -5483,9 +5483,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync N> This method retrieves the images when rendered on the signed signature field appearance; otherwise, it will return null. -## Integrating signature and timestamp certificates into the Document Secure Store (DSS). +## Integrating signature and timestamp certificates into the Document Security Store (DSS) -Effortlessly Integrate **signature and timestamp** certificates into the Document Security Store (DSS) with the Essential® PDF Library. This streamlined process enhances certificate management, ensuring robust validation for your PDF documents. Below is a code example demonstrating how to include certificates when creating Long-Term Validity (LTV) from an external signature, utilizing the [CreateLongTermValidity](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_CreateLongTermValidity_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Boolean_) method in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. +Effortlessly integrate **signature and timestamp** certificates into the Document Security Store (DSS) with the Essential® PDF Library. This streamlined process enhances certificate management, ensuring robust validation for your PDF documents. Below is a code example demonstrating how to include certificates when creating Long-Term Validity (LTV) from an external signature, utilizing the [CreateLongTermValidity](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html#Syncfusion_Pdf_Security_PdfSignature_CreateLongTermValidity_System_Collections_Generic_List_System_Security_Cryptography_X509Certificates_X509Certificate2__System_Boolean_) method in the [PdfSignature](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfSignature.html) class. {% tabs %} diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md index 8951484db9..c33baf7282 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md @@ -5,11 +5,11 @@ platform: document-processing control: PDF documentation: UG --- -# Working with Document Conversions in File Formats PDF +# Working with Document Conversions in File Formats PDF ## Converting Word documents to PDF -Essential® PDF allows you to convert a Word document into PDF. For converting a Word document to PDF, the following assemblies need to be referenced in your application. +Essential® PDF enables you to convert a Word document into a PDF. To convert a Word document to PDF, the following assemblies need to be referenced in your application. @@ -22,15 +22,15 @@ Description

+This assembly contains the core features for creating and manipulating Word documents.

+This assembly is used to package Word documents.

+This assembly is needed for converting Word documents to PDF.

+This assembly provides features to work with charts in Word documents.

Syncfusion.DocIO.Base

-This assembly has the core features for creating and manipulating Word documents.

Syncfusion.Compression.Base

-This assembly is used to package the Word documents

Syncfusion.DocToPdfConverter.Base

-This assembly is needed for converting the Word document to PDF.

Syncfusion.Pdf.Base

@@ -38,11 +38,11 @@ This assembly has the core features for creating PDF file.

Syncfusion.OfficeChart.Base

-This assembly has features to work with chart in Word document.

-The following assemblies are need to be referred in addition to the above mentioned assemblies for converting the chart present in the Word document into PDF. +The following assemblies are also required, in addition to the assemblies listed above, to convert charts present in a Word document into PDF. @@ -55,7 +55,7 @@ Description

+This assembly is used to convert charts to images.

Syncfusion.OfficeChartToImageConverter.WPF

-This assembly is used to convert the chart to image.

Syncfusion.SfChart.WPF

@@ -77,13 +77,13 @@ For Windows Forms, WPF, ASP.NET and ASP.NET MVC applications * using Syncfusion.Pdf * using Syncfusion.OfficeChartToImageConverter -For ASP.NET Core and Xamarin applications +For ASP.NET Core and Xamarin applications: * using Syncfusion.DocIO * using Syncfusion.DocIO.DLS * using Syncfusion.DocIORenderer * using Syncfusion.Pdf -[DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class is responsible for converting a Word document into PDF. The following code snippet illustrates how to convert a Word document into PDF document. +The [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class is responsible for converting a Word document into a PDF. The following code snippet illustrates how to convert a Word document into a PDF document. {% tabs %} @@ -168,7 +168,7 @@ N> 3. Total number of pages may vary based on unsupported elements in the conve ### Customizing the Word document to PDF conversion -Essential® DocIO allows you to customize the Word to PDF conversion using [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the below options: +Essential® DocIO enables you to customize the Word to PDF conversion using the [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the following options: * Allows to determine the quality of the charts in the converted PDF. * Allows to determine the quality of the JPEG images in the converted PDF. @@ -178,7 +178,7 @@ Essential® DocIO allows you to customize the Word to PDF conversi {% highlight c# tabtitle="C# [Cross-platform]" %} -//PDF doesn't support customizing the Word document C#.NET Cross platforms. +//Customizing the Word to PDF conversion is supported only on Windows-specific (classic .NET Framework) targets. {% endhighlight %} @@ -258,16 +258,16 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Converting Excel documents to PDF -[ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) is responsible for converting an Excel document into PDF. Essential® PDF allows you to convert an entire workbook or a single worksheet into PDF document. Refer to the following links for assemblies/nuget packages required based on platforms to convert Excel document into PDF. +[ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) is responsible for converting an Excel document into a PDF. Essential® PDF enables you to convert an entire workbook or a single worksheet into a PDF document. Refer to the following links for the assemblies/NuGet packages required, based on the platform, to convert an Excel document into PDF. * [Assemblies Information](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/assemblies-required#converting-excel-document-to-pdf) * [NuGet Information](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/nuget-packages-required#converting-excel-document-to-pdf) -N> Excel to PDF conversion works proper in Blazor server-side alone and not in client-side. +N> Excel to PDF conversion works only in Blazor server-side, not in Blazor client-side. -### Converting a Workbook to PDF +### Converting a workbook to PDF -The following code illustrates how to convert a workbook to PDF Document using [IWorkbook](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbook.html) type in [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorkbook_) class. +The following code illustrates how to convert a workbook to a PDF document using the [IWorkbook](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbook.html) type in the [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorkbook_) class. {% tabs %} @@ -299,7 +299,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -344,9 +344,9 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/Excel-to-PDF/Convert-workbook-to-PDF-document). -### Converting a Worksheet to PDF +### Converting a worksheet to PDF -The following code shows how to convert a particular sheet to PDF Document using [IWorksheet](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html) type in [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class. +The following code shows how to convert a particular sheet to a PDF document using the [IWorksheet](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html) type in the [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class. {% tabs %} @@ -356,7 +356,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -382,7 +382,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -431,9 +431,9 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/Excel-to-PDF/Converting-a-worksheet-to-PDF-document). -### Creating individual PDF document for each worksheet +### Creating an individual PDF document for each worksheet -The following code snippet shows how to create an individual PDF document for each worksheet in a workbook using [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class. +The following code snippet shows how to create an individual PDF document for each worksheet in a workbook using the [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class. {% tabs %} @@ -443,25 +443,23 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic); //Create a new PDF document. - PdfDocument pdfDocument = new PdfDocument(); - foreach (IWorksheet sheet in workbook.Worksheets) - { - //Open the Excel document to Convert. - ExcelToPdfConverter converter = new ExcelToPdfConverter(sheet); - pdfDocument = converter.Convert(); +PdfDocument pdfDocument = new PdfDocument(); +foreach (IWorksheet sheet in workbook.Worksheets) +{ + //Open the Excel document to Convert. + ExcelToPdfConverter converter = new ExcelToPdfConverter(sheet); + pdfDocument = converter.Convert(); - //Save the PDF file. - pdfDocument.Save(sheet.Name +".pdf"); - converter.Dispose(); - } -} + //Save the PDF file. + pdfDocument.Save(sheet.Name +".pdf"); + converter.Dispose(); {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} @@ -470,7 +468,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -522,9 +520,9 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/Excel-to-PDF/Creating-individual-PDF-document-for-each-worksheet). -### Excel with Chart to PDF +### Excel with chart to PDF -To preserve the charts during Excel to PDF conversion, you should initialize the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IApplication.html#Syncfusion_XlsIO_IApplication_ChartToImageConverter) of [IApplication](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IApplication.html) interface, otherwise the charts present in worksheet will get skipped. The following code illustrate how to convert an Excel with chart to PDF document. +To preserve charts during Excel to PDF conversion, you should initialize the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IApplication.html#Syncfusion_XlsIO_IApplication_ChartToImageConverter) of the [IApplication](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IApplication.html) interface; otherwise, the charts present in the worksheet will be skipped. The following code illustrates how to convert an Excel document with charts to a PDF document. {% tabs %} @@ -534,7 +532,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -563,7 +561,7 @@ using Syncfusion.Pdf; using Syncfusion.XlsIO; using Syncfusion.XlsIORenderer; -Using(ExcelEngine excelEngine = new ExcelEngine()) +using (ExcelEngine excelEngine = new ExcelEngine()) { IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2013; @@ -620,7 +618,7 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/Excel-to-PDF/Converting-Excel-with-chart-to-PDF-document). -### Supported Elements +### Supported elements This feature provides support for the following elements: @@ -644,9 +642,9 @@ This feature provides support for the following elements: * Print Order Support * Unicode in Headers and Footers -### Unsupported Elements +### Unsupported elements -The following list contains unsupported elements that presently will not be preserved in the generated PDF document. +The following list contains elements that are not currently supported and will not be preserved in the generated PDF document. * Grouping columns * OLE Objects @@ -655,7 +653,7 @@ The following list contains unsupported elements that presently will not be pres ## Converting RTF documents to PDF -Essential® PDF allows you to convert a RTF to PDF document. For converting a RTF to PDF, the following assemblies need to be referenced in your application. +Essential® PDF enables you to convert an RTF document into a PDF. To convert an RTF to PDF, the following assemblies need to be referenced in your application. @@ -668,15 +666,15 @@ Description

+This assembly contains the core features for creating and manipulating RTF documents.

+This assembly is used to package RTF documents.

+This assembly is needed for converting RTF documents to PDF.

Syncfusion.DocIO.Base

-This assembly has the core features for creating and manipulating RTF documents.

Syncfusion.Compression.Base

-This assembly is used to package the RTF documents

Syncfusion.DocToPdfConverter.Base

-This assembly is needed for converting the RTF to PDF.

Syncfusion.Pdf.Base

@@ -692,13 +690,13 @@ For Windows Forms, WPF, ASP.NET and ASP.NET MVC applications * using Syncfusion.DocToPDFConverter * using Syncfusion.Pdf -For ASP.NET Core and Xamarin applications +For ASP.NET Core and Xamarin applications: * using Syncfusion.DocIO * using Syncfusion.DocIO.DLS * using Syncfusion.DocIORenderer * using Syncfusion.Pdf -[DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class is responsible for converting a RTF to PDF. The following code snippet illustrates how to convert a RTF to PDF document. +The [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class is responsible for converting an RTF document into a PDF. The following code snippet illustrates how to convert an RTF document into a PDF document. {% tabs %} @@ -751,8 +749,8 @@ Imports Syncfusion.DocIO.DLS Imports Syncfusion.DocIORenderer Imports Syncfusion.Pdf -'Load an existing Word document -Dim rtfDocument As New WordDocument(inputFileName) +'Load an existing RTF document +Dim rtfDocument As New WordDocument("Input.rtf") 'Create an instance of DocToPDFConverter Dim converter As New DocToPDFConverter() 'Convert Word document into PDF document @@ -770,11 +768,11 @@ rtfDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/RTF-to-PDF/Convert-RTF-to-PDF-document). -N> Total number of pages may vary based on unsupported elements in the converted PDF document when compare to RTF document. +N> The total number of pages may vary based on the unsupported elements in the converted PDF document when compared to the original RTF document. ### Customizing the RTF to PDF conversion -Essential® DocIO allows you to customize the RTF to PDF conversion using [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the below options: +Essential® DocIO enables you to customize the RTF to PDF conversion using the [DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the following options: * Allows to determine the quality of the JPEG images in the converted PDF. * Allows to reduce the Main Memory usage in RTF to PDF conversion by reusing the identical images. @@ -783,7 +781,7 @@ Essential® DocIO allows you to customize the RTF to PDF conversio {% highlight c# tabtitle="C# [Cross-platform]" %} -//PDF doesn't support customizing the RTF to PDF conversion C#.NET Cross platforms. +//Customizing the RTF to PDF conversion is supported only on Windows-specific (classic .NET Framework) targets. {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} @@ -794,8 +792,8 @@ using Syncfusion.Pdf; using System; using System.Collections.Generic; -//Loads an existing Word document -WordDocument rtfDocument = new WordDocument(inputFileName); +//Load an existing RTF document +WordDocument rtfDocument = new WordDocument("Input.rtf"); //create an instance of DocToPDFConverter - responsible for Word to PDF conversion DocToPDFConverter converter = new DocToPDFConverter(); //Set the image quality @@ -823,8 +821,8 @@ Imports Syncfusion.Pdf Imports System Imports System.Collections.Generic -'Loads an existing Word document -Dim rtfDocument As New WordDocument(inputFileName) +'Load an existing RTF document +Dim rtfDocument As New WordDocument("Input.rtf") 'create an instance of DocToPDFConverter - responsible for Word to PDF conversion Dim converter As New DocToPDFConverter() 'Set the image quality @@ -849,11 +847,11 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Converting TIFF to PDF -### Converting multi page TIFF to PDF +### Converting multi-page TIFF to PDF -Multi frame TIFF image can be converted to PDF document using [PdfBitmap](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfBitmap.html) class. This can be done by accessing each frame of the multi frame TIFF image and rendering it in each page of the PDF document. +A multi-frame TIFF image can be converted to a PDF document using the [PdfBitmap](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfBitmap.html) class. This can be done by accessing each frame of the multi-frame TIFF image and rendering it on each page of the PDF document. -The code snippet to illustrate the same is given below. +The following code snippet illustrates the same. {% tabs %} @@ -979,13 +977,13 @@ pdfDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/TIFF-to-PDF/Converting-multipage-TIFF-to-PDF-document). -N> 1. Essential® PDF supports converting TIFF to PDF with [Syncfusion.Pdf.Imaging.Portable](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.Net.Core) assembly reference in ASP.NET Core. +N> 1. Essential® PDF supports converting TIFF to PDF with a [Syncfusion.Pdf.Imaging.Portable](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.Net.Core) assembly reference in ASP.NET Core. ### Compression in monochrome images -Essential® PDF supports JBIG2 compression for best compression of monochrome images. +Essential® PDF supports JBIG2 compression for the best compression of monochrome images. -Refer the below code snippet to draw a single frame monochrome TIFF image with JBIG2 compression using [EncodingType](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.EncodingType.html) Enum. +Refer to the following code snippet to draw a single-frame monochrome TIFF image with JBIG2 compression using the [EncodingType](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.EncodingType.html) enum. @@ -1012,7 +1010,7 @@ Refer the below code snippet to draw a single frame monochrome TIFF image with J {% highlight c# tabtitle="C# [Cross-platform]" %} -//PDF doesn't support compressing monochrome images C#.NET Cross platforms. +//Compressing monochrome images with JBIG2 is supported only on Windows-specific (classic .NET Framework) targets. {% endhighlight %} @@ -1029,7 +1027,7 @@ PdfDocument pdfDocument = new PdfDocument(); PdfPage page = pdfDocument.Pages.Add(); //Load single frame TIFF image -PdfBitmap tiffImage = PdfImage.FromFile("image.tiff") as PdfBitmap; +PdfBitmap tiffImage = new PdfBitmap("image.tiff"); //Set encode type tiffImage.Encoding = EncodingType.JBIG2; //Draw an image @@ -1054,7 +1052,7 @@ Dim pdfDocument As New PdfDocument() Dim page As PdfPage = pdfDocument.Pages.Add() 'Load single frame TIFF image -Dim tiffImage As PdfBitmap = TryCast(PdfImage.FromFile("image.tiff"), PdfBitmap) +Dim tiffImage As New PdfBitmap("image.tiff") 'Set encode type tiffImage.Encoding = EncodingType.JBIG2 'Draw an image @@ -1069,16 +1067,16 @@ pdfDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/TIFF-to-PDF/Compression-in-monochrome-images). -N> 1. Currently the JBIG2Decode compression is supported only in lossy mode and also only single frame TIFF images are supported. -N> 2. By default, all monochrome images will be compressed in CITTT4 compression. +N> 1. Currently, JBIG2Decode compression is supported only in lossy mode, and only single-frame TIFF images are supported. +N> 2. By default, all monochrome images will be compressed using CCITT4 compression. -## Converting XPS document to PDF +## Converting an XPS document to PDF -The XPS (XML Paper Specification) document format is a fixed document format which consists of structured XML markup that defines the layout of a document and the visual appearance of each page, along with rendering rules for distributing, archiving, rendering, processing and printing the documents. +The XPS (XML Paper Specification) document format is a fixed document format that consists of structured XML markup defining the layout of a document and the visual appearance of each page, along with rendering rules for distributing, archiving, rendering, processing, and printing the documents. -Essential® PDF provides support for converting XPS to PDF using [XPSToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.XPS.XPSToPdfConverter.html) class. +Essential® PDF provides support for converting XPS to PDF using the [XPSToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.XPS.XPSToPdfConverter.html) class. -The below code illustrates how to convert XPS to PDF. +The following code illustrates how to convert an XPS to a PDF. {% tabs %} @@ -1136,9 +1134,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync N> Essential® PDF supports converting XPS to PDF with [Syncfusion.XpsToPdfConverter.Net.Core](https://www.nuget.org/packages/Syncfusion.XpsToPdfConverter.Net.Core) package reference in .NET Core application. -### Supported Elements +### Supported elements -The below table shows the list of elements supported in XPS during the conversion. +The following table lists the elements supported in XPS during the conversion.
Encoding Type
@@ -1287,9 +1285,9 @@ No

-## Converting PDF to Image +## Converting PDF to image -This PDF to image converter library allows converting PDF documents to images without opening the document in the PDF Viewer control. It allows you to selectively export pages as a stream by utilizing the 'Convert' method, facilitating the transformation of PDF files into images. +This PDF to image converter library enables converting PDF documents to images without opening the document in the PDF Viewer control. It allows you to selectively export pages as a stream by utilizing the `Convert` method, facilitating the transformation of PDF files into images. NuGet @@ -1337,7 +1335,7 @@ ASP.NET MVC Windows N> The above mentioned NuGet packages are available in [nuget.org](https://www.nuget.org/). -The following code snippet illustrates how to convert PDF page into image using Convert method in PdfToImageConverter. +The following code snippet illustrates how to convert a PDF page into an image using the `Convert` method in `PdfToImageConverter`. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -1374,7 +1372,7 @@ image.Save("sample.png"); {% endhighlight %} -{% highlight vb tabtitle="VB.NET [Windows-specific]" %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} Imports Syncfusion.PdfToImageConverter Imports System.IO @@ -1395,7 +1393,7 @@ image.Save("sample.png") You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/WPF-PDFViewer-Examples/tree/master/PDF-to-image). -N> To know more about PdfToImageConverter and features it provides, please refer to [PdfToImageConverter](https://help.syncfusion.com/document-processing/pdf/conversions/pdf-to-image/net/convert-pdf-file-to-image-in-asp-net-core) +N> To know more about `PdfToImageConverter` and the features it provides, please refer to [PdfToImageConverter](https://help.syncfusion.com/document-processing/pdf/conversions/pdf-to-image/net/convert-pdf-file-to-image-in-asp-net-core). ## HTML to PDF @@ -1462,9 +1460,9 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/Convert-website-URL-to-PDF-document). -## SVG to PDF +## SVG to PDF -The [HTML to PDF converter library](https://www.syncfusion.com/document-sdk/net-pdf-library/html-to-pdf) supports converting the SVG to PDF document. Please refer to the following code example. +The [HTML to PDF converter library](https://www.syncfusion.com/document-sdk/net-pdf-library/html-to-pdf) supports converting SVG to a PDF document. Please refer to the following code example. {% tabs %} diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Document.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Document.md index da1814caa6..ba50066d6e 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Document.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Document.md @@ -286,7 +286,7 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Document/Change-the-page-orientation-from-portrait-to-landscape/). -> **NOTE:** The PDF page orientation is normally inferred from the custom page size. However, if you set a custom orientation using the [Orientation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageSettings.html#Syncfusion_Pdf_PdfPageSettings_Orientation) property, the page dimensions are adjusted to match the selected orientation (for example, an A4 page set to landscape becomes 842 x 595 points). The `Orientation` property is intended for new documents; for existing documents, use the `Rotate` property of the `PdfPageSettings` class instead. +N> The PDF page orientation is normally inferred from the custom page size. However, if you set a custom orientation using the [Orientation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageSettings.html#Syncfusion_Pdf_PdfPageSettings_Orientation) property, the page dimensions are adjusted to match the selected orientation (for example, an A4 page set to landscape becomes 842 x 595 points). The `Orientation` property is intended for new documents; for existing documents, use the `Rotate` property of the `PdfPageSettings` class instead. You can also change the orientation by setting a rotation angle using the [PdfPageRotateAngle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageRotateAngle.html) enumeration, as illustrated in the following code example. @@ -383,8 +383,6 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Document/Rotate_PDF_based_on_angle/). -> **TIP:** The [PdfPageRotateAngle](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageRotateAngle.html) enumeration accepts the values **RotateAngle0**, **RotateAngle90**, **RotateAngle180**, and **RotateAngle270**. Rotation is a view-time setting; it does not change the underlying page dimensions, so existing layout and coordinates remain valid. Use the `Rotate` property for rotating pages in existing PDF documents, where the `Orientation` property cannot be applied. - ## Creating sections in a PDF A PDF section is a logical grouping of one or more pages that can share common page settings such as size, orientation, margins, and template. A single [PdfDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocument.html) can contain multiple [PdfSection](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfSection.html) objects, allowing pages with different page settings to coexist in the same document (for example, landscape title pages followed by portrait body pages). Each section maintains its own [PageSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfSection.html#Syncfusion_Pdf_PdfSection_PageSettings) through the `PdfSection.PageSettings` property. The following code example illustrates how to create a `PdfSection` in a PDF document. @@ -523,29 +521,6 @@ SendToPrinter("Input.pdf") {% endtabs %} -> **TIP:** To show the standard print dialog before printing, use the `PrintDialog` pattern so that the user can select a printer, choose a page range, or export to a file: -> -> ```csharp -> using System.Drawing.Printing; -> using System.Windows.Forms; -> using Syncfusion.Windows.Forms.PdfViewer; -> -> using (PdfDocumentView viewer = new PdfDocumentView()) -> { -> viewer.Load("Input.pdf"); -> -> PrintDialog dialog = new PrintDialog(); -> dialog.AllowPrintToFile = true; -> dialog.AllowSomePages = true; -> dialog.AllowCurrentPage = true; -> dialog.Document = viewer.PrintDocument; -> if (dialog.ShowDialog() == DialogResult.OK) -> { -> viewer.PrintDocument.Print(); -> } -> } -> ``` - ## Working with document properties Essential® PDF allows you to set, read, and modify the document information of a PDF, such as Author, CreationDate, Subject, Title, and Producer. The [DocumentInformation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentBase.html#Syncfusion_Pdf_PdfDocumentBase_DocumentInformation) property of the [PdfDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocument.html) or [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) provides access to this information through the [PdfDocumentInformation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfDocumentInformation.html) class. These values are stored in the PDF information dictionary and are visible from the **File > Properties > Description** dialog in most PDF viewers. @@ -659,8 +634,6 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Document/Add_PDF_document_properties/). -> **NOTE:** The standard information entries that can be set or read through the [DocumentInformation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentBase.html#Syncfusion_Pdf_PdfDocumentBase_DocumentInformation) property are **Author**, **Creator**, **Keywords**, **Subject**, **Title**, **Producer**, **CreationDate**, and **ModDate**. The **Producer** and **ModDate** entries are populated automatically by the library and should not be set manually in most scenarios. - To read and modify the [DocumentInformation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentBase.html#Syncfusion_Pdf_PdfDocumentBase_DocumentInformation) property of an existing PDF document, use the [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) class. The following code example explains how to do this. {% tabs %} @@ -815,8 +788,6 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Document/Remove-specific-keys-from-the-existing-document-information). -> **IMPORTANT:** The **ModDate** entry is maintained automatically by the library when the document is saved and cannot be removed through the `Remove` method. Removing **Producer** is also not recommended in most workflows because it identifies the library that generated the document. If a key does not exist in the document information dictionary, the `Remove` method has no effect, and no exception is thrown. - ## Performing incremental update for PDF document Essential® PDF supports incremental updates for a PDF document. The content of a PDF file can be updated incrementally without rewriting the entire file. Changes are appended to the end of the file, leaving its original contents intact. The main benefit is that small changes to a large PDF document can be saved quickly, but the resulting document size increases compared with the original PDF document. By default, the [IncrementalUpdate](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfFileStructure.html#Syncfusion_Pdf_PdfFileStructure_IncrementalUpdate) property of [PdfFileStructure](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfFileStructure.html) is set to `true` (incremental mode). Disabling the property rewrites the entire file, which results in a smaller PDF and is recommended when you want to produce a compact output for distribution. This is illustrated in the following code sample. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Flow-Layout.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Flow-Layout.md index 9418c0b32e..26ceff016c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Flow-Layout.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Flow-Layout.md @@ -36,32 +36,6 @@ PDF documents can be created using a flow layout (also referred to as the flow m
-> **NOTE:** The table lists both the legacy assembly names and the recommended NuGet packages. For modern .NET (Core, .NET 5+, .NET Standard) projects, install the corresponding NuGet package using the NuGet Package Manager or the `Install-Package` command in the Package Manager Console. For traditional .NET Framework projects, you can continue to reference the assemblies directly. - -Include the following namespaces in your .cs or .vb file as shown below. -{% tabs %} -{% highlight c# tabtitle="C# [Cross-platform]" %} -using Syncfusion.Pdf; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; -{% endhighlight %} - -{% highlight c# tabtitle="C# [Windows-specific]" %} - -using Syncfusion.Pdf; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocToPDFConverter; - -{% endhighlight %} - -{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Imports Syncfusion.Pdf -Imports Syncfusion.DocIO.DLS -Imports Syncfusion.DocToPDFConverter -{% endhighlight %} - -{% endtabs %} - ## Working with Text You can create a PDF document with multiple paragraph text using flow model with the following code snippet. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Headers-and-Footers.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Headers-and-Footers.md index 44f5a0a4cc..b0fc9a071c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Headers-and-Footers.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Headers-and-Footers.md @@ -12,26 +12,6 @@ Syncfusion® PDF supports drawing headers and footers in a PDF doc To quickly get started with adding headers and footers to PDF files using the Syncfusion® PDF library for .NET, refer to this video tutorial. {% youtube "https://youtu.be/zGcQEVw5v9Y?si=lI6qZLUJRw6UWUZi" %} -## Assemblies and NuGet packages - -The following assemblies or NuGet packages are required to work with PDF headers and footers. - -**Assemblies** - -* Syncfusion.Pdf.Base -* Syncfusion.Drawing.Base - -**NuGet packages** - -* [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core) (cross-platform) -* [Syncfusion.Pdf.WinForms](https://www.nuget.org/packages/Syncfusion.Pdf.WinForms) (Windows-specific) -* [Syncfusion.Pdf.Wpf](https://www.nuget.org/packages/Syncfusion.Pdf.Wpf) (Windows-specific) -* [Syncfusion.Pdf.AspNet](https://www.nuget.org/packages/Syncfusion.Pdf.AspNet) (ASP.NET Web Forms) -* [Syncfusion.Pdf.AspNet.Mvc5](https://www.nuget.org/packages/Syncfusion.Pdf.AspNet.Mvc5) (ASP.NET MVC5) -* [Syncfusion.Pdf.AspNet.Mvc4](https://www.nuget.org/packages/Syncfusion.Pdf.AspNet.Mvc4) (ASP.NET MVC4) - -For more information, refer to the [Assemblies Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/assemblies-required) and [NuGet Packages Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/nuget-packages-required) documentation. - ## Page template areas When you assign a template to a page, Syncfusion® PDF divides each page into the following four areas: @@ -183,8 +163,6 @@ pdfDocument.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Header%20and%20Footer/Adding-an-automatic-field-in-header-and-footer). -> **Note:** Replace `Logo.png` with the actual path to your image file. If the image is larger than the template bounds, it will be clipped. Use [PdfBitmap](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfBitmap.html) or [PdfImage](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfImage.html) appropriate for your platform. - ## Adding dynamic headers and footers in PDF documents You can add unique, dynamic headers and footers like page numbers or dates to each page in a PDF by handling the [PageAdded](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentBase.html#Syncfusion_Pdf_PdfDocumentBase_PageAdded) event of the [PdfDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocument.html) class. By also using the [BeginPageLayout](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfLayoutElement.html#Syncfusion_Pdf_Graphics_PdfLayoutElement_BeginPageLayout) event of the [PdfTextElement](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfTextElement.html) to reserve space, you ensure that your main content does not overlap with the headers or footers. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-JavaScript.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-JavaScript.md index 38a0cc77f8..698927f78c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-JavaScript.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-JavaScript.md @@ -14,8 +14,6 @@ A JavaScript action allows execution of JavaScript code embedded in a PDF docume * JavaScript action on form fields * JavaScript in 3D annotations -> **Note:** PDF JavaScript uses the Acrobat JavaScript API (such as `app.alert`, `this.print`, and `host.getURL`) rather than the standard browser JavaScript API. Refer to the [Acrobat JavaScript API Reference](https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/) for the complete list of supported objects and methods. - ## Document-level JavaScript action You can add a JavaScript action to the PDF document by using the [PdfJavaScriptAction](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfJavaScriptAction.html) class and assigning it to the [Actions](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocument.html#Syncfusion_Pdf_PdfDocument_Actions) property of the [PdfDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocument.html) class. The following code example shows how to add an `AfterOpen` action that displays an alert when the document is opened. @@ -93,8 +91,6 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/JavaScript/Add-the-JavaScript-action-to-the-PDF-document). -> **Note:** The [PdfDocumentActions](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentActions.html) class also exposes the [BeforeClose](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentActions.html#Syncfusion_Pdf_PdfDocumentActions_BeforeClose) and [BeforeSave](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfDocumentActions.html#Syncfusion_Pdf_PdfDocumentActions_BeforeSave) properties, which allow you to trigger JavaScript code before the document is closed or saved. - ## JavaScript action on form fields You can add JavaScript actions to form fields using the [PdfJavaScriptAction](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfJavaScriptAction.html) class. The [PdfFieldActions](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfFieldActions.html) class is used to assign actions to a form field. @@ -310,8 +306,6 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/JavaScript/Add-JavaScript-to-3D-annotation-in-a-PDF-document). -> **Note:** 3D annotations require a U3D-formatted file as input. The U3D file must be available in the application directory or supplied through a stream. To view 3D content, the PDF reader must support the PDF 3D specification; the standard Acrobat Reader provides this support. - ## Add/Modify JavaScript actions to the PDF Add or modify the JavaScript action in a [PdfLoadedDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html). The below code example shows how to add/modify JavaScript code using [PdfJavaScriptAction](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfJavaScriptAction.html) class to an existing PDF document. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Named-Destination.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Named-Destination.md index d5856ecdbb..fbceee9d7c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Named-Destination.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Named-Destination.md @@ -294,8 +294,6 @@ lDoc.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Named%20Destination/Remove-and-modify-the-named-destination-in-a-PDF). -> **Note:** The `Zoom` value of a [PdfDestination](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfDestination.html) represents a multiplier on the standard zoom level, where `1.0` equals 100 percent. A value of `4` therefore corresponds to a zoom level of 400 percent. - ## Adding a named destination to bookmarks The following code example shows how to add a named destination to the [bookmarks](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-bookmarks) in the PDF document. When the named destination is assigned to a bookmark, the bookmark becomes navigable to the destination's location in the document. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Shapes.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Shapes.md index 3ef642880f..e032ebd23d 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Shapes.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Shapes.md @@ -1412,7 +1412,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync You can draw a Bezier curve in a PDF document by using the [DrawBezier](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfGraphics.html#Syncfusion_Pdf_Graphics_PdfGraphics_DrawBezier_Syncfusion_Pdf_Graphics_PdfPen_System_Drawing_PointF_System_Drawing_PointF_System_Drawing_PointF_System_Drawing_PointF_) method of [PdfGraphics](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfGraphics.html). The `startPoint` and `endPoint` define the curve segment, while the two control points shape the curve between them. -> Use the [PdfBezierCurve](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfBezierCurve.html) class to draw a Bezier curve that flows between multiple pages, or to control the curve with a layout format. +N> Use the [PdfBezierCurve](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Graphics.PdfBezierCurve.html) class to draw a Bezier curve that flows between multiple pages, or to control the curve with a layout format. The following code snippet explains how to draw a Bezier in a new PDF document. @@ -2164,11 +2164,4 @@ You can download a complete working sample from [GitHub](https://github.com/Sync | `PdfLoadedPage` is `null` after loading a document | The document path is incorrect or the file is not a valid PDF. | Verify that the file path is correct and that the file can be opened in any PDF reader. | | The drawn shape does not appear in the output | The coordinates are outside the page bounds, or the page was not added to the document. | Confirm that the page has been added to `document.Pages` and that the coordinates fall within the page size. | | `Cross-platform` and `Windows-specific` samples reference different types (`Syncfusion.Drawing.PointF` vs `System.Drawing.PointF`) | The `using` directives differ. | Use the `Syncfusion.Drawing.PointF` type explicitly in cross-platform code, or add `using Syncfusion.Drawing;` so the compiler resolves the type. | -| License warnings are displayed in the output | The Syncfusion license has not been registered. | Register the license at application startup by calling `Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("your license key")`. Refer to the [documentation](https://help.syncfusion.com/common/essential-studio/licensing/overview) for more information. | - -## See also - -* [Working with Brushes](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-brushes) -* [Working with Colorspace](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-colorspace) -* [Working with Text](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-text) -* [Working with Pages](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-pages) +| License warnings are displayed in the output | The Syncfusion license has not been registered. | Register the license at application startup by calling `Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("your license key")`. Refer to the [documentation](https://help.syncfusion.com/common/essential-studio/licensing/overview) for more information. diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Text.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Text.md index 1595e14d54..09c7066b1c 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Text.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Text.md @@ -3066,8 +3066,6 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Frequently asked questions -### Why are German culture-specific characters (like € or umlauts) not printing correctly in the PDF when exporting the Grid? - ### Why are German culture-specific characters (like € or umlauts) not printing correctly in the PDF when exporting the Grid?
Exception diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-forms.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-forms.md index 65c26e128e..ecd033de8b 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-forms.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-forms.md @@ -2028,7 +2028,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Please refer to the [actions](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-action#adding-an-action-to-the-form-field) section for more details. -> **NOTE:** Essential® PDF allows users to preserve the extended rights for form filling alone. To learn how to preserve extended rights, refer to the [Working with Document](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-document#performing-incremental-update-for-pdf-document) section. +N> Essential® PDF allows users to preserve the extended rights for form filling alone. To learn how to preserve extended rights, refer to the [Working with Document](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-document#performing-incremental-update-for-pdf-document) section. ## Filling form fields in an existing PDF Document