Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5742,7 +5742,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync

The Essential<sup>&reg;</sup> PDF supports removing comments and reviewing status from the PDF annotation.

The following code example explains how to remove comments using [RemoveAt](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedPageCollection.html#Syncfusion_Pdf_Parsing_PdfLoadedPageCollection_RemoveAt_System_Int32_) method from the existing PDF annotation.
The following code example explains how to remove comments using [RemoveAt](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedPopupAnnotationCollection.html#Syncfusion_Pdf_Parsing_PdfLoadedPopupAnnotationCollection_RemoveAt_System_Int32_) method from the existing PDF annotation.

{% tabs %}

Expand All @@ -5766,7 +5766,7 @@ PdfLoadedPopupAnnotationCollection commentsCollection = loadedRectangleAnnotatio
commentsCollection.RemoveAt(0);

//Save the document
lDoc.Save("Output.pdf");
ldoc.Save("Output.pdf");
//Closes the document
ldoc.Close(true);
{% endhighlight %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ For ASP.NET Core and Xamarin applications
* using Syncfusion.DocIORenderer
* using Syncfusion.Pdf

[DocToPDFConverter](https://help.syncfusion.com/cr/document-processings/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.
[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.

{% tabs %}

Expand Down Expand Up @@ -162,13 +162,13 @@ wordDocument.Close()
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Document%20conversion/Word-to-PDF/Converting-Word-to-PDF-document).

Note:
* Initializing the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is mandatory to convert the charts present in the Word document to PDF. Otherwise the charts will not be exported to the converted PDF.
* [ChartToImageConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is supported from .NET Framework 4.0 onwards.
* Initializing the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is mandatory to convert the charts present in the Word document to PDF. Otherwise the charts will not be exported to the converted PDF.
* [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is supported from .NET Framework 4.0 onwards.
* Total number of pages may vary based on unsupported elements in the converted PDF document when compare to Word document.

### Customizing the Word document to PDF conversion

Essential<sup>&reg;</sup> DocIO allows you to customize the Word to PDF conversion using [DocToPDFConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the below options:
Essential<sup>&reg;</sup> 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:

* 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.
Expand Down Expand Up @@ -258,7 +258,7 @@ 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-processings/Syncfusion.ExcelToPDFConverter.Base~Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) is responsible for converting an Excel document into PDF. Essential<sup>&reg;</sup> 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.Base~Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) is responsible for converting an Excel document into PDF. Essential<sup>&reg;</sup> 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.

* [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)
Expand All @@ -267,7 +267,7 @@ N> Excel to PDF conversion works proper in Blazor server-side alone and not in c

### 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-processings/Syncfusion.XlsIO.IWorkbook.html) type in [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorkbook_) class.
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.

{% tabs %}

Expand Down Expand Up @@ -346,7 +346,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync

### 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-processings/Syncfusion.XlsIO.IWorksheet.html) type in [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class.
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.

{% tabs %}

Expand Down Expand Up @@ -433,7 +433,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync

### Creating 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-processings/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 [ExcelToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter__ctor_Syncfusion_XlsIO_IWorksheet_) class.

{% tabs %}

Expand Down Expand Up @@ -524,7 +524,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync

### 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-processings/Syncfusion.XlsIO.IApplication.html#Syncfusion_XlsIO_IApplication_ChartToImageConverter) of [IApplication](https://help.syncfusion.com/cr/document-processings/Syncfusion.XlsIO.Base~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 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.Base~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.

{% tabs %}

Expand Down Expand Up @@ -698,7 +698,7 @@ For ASP.NET Core and Xamarin applications
* using Syncfusion.DocIORenderer
* using Syncfusion.Pdf

[DocToPDFConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.DocToPDFConverter.Base~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.
[DocToPDFConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.Base~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.

{% tabs %}

Expand Down Expand Up @@ -774,7 +774,7 @@ N> Total number of pages may vary based on unsupported elements in the converte

### Customizing the RTF to PDF conversion

Essential<sup>&reg;</sup> DocIO allows you to customize the RTF to PDF conversion using [DocToPDFConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.DocToPDFConverter.DocToPDFConverter.html) class with the below options:
Essential<sup>&reg;</sup> 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:

* 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.
Expand Down Expand Up @@ -851,7 +851,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync

### Converting multi page TIFF to PDF

Multi frame TIFF image can be converted to PDF document using [PdfBitmap](https://help.syncfusion.com/cr/document-processings/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.
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.

The code snippet to illustrate the same is given below.

Expand Down Expand Up @@ -985,7 +985,28 @@ N> 1. Essential<sup>&reg;</sup> PDF supports converting TIFF to PDF with [Syncfu

Essential<sup>&reg;</sup> PDF supports JBIG2 compression for 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-processings/Syncfusion.Pdf.Graphics.EncodingType.html) Enum.
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.

<table border="1">
<th style="font-size:14px" width="100px">Encoding Type</th>
<th style="font-size:14px">Image Type</th>
<th style="font-size:14px">Compression Applied</th>
<tr>
<td>Default</td>
<td>All images</td>
<td>Applies <b>Deflate (DEFLATE)</b> compression to monochrome, grayscale, and color images.</td>
</tr>
<tr>
<td>Default</td>
<td>TIFF images</td>
<td>Monochrome TIFF images use <b>CCITT Group 4 (CCITT4)</b> compression by default.</td>
</tr>
<tr>
<td>JBIG2</td>
<td>All images</td>
<td>Supported only in lossy mode and only for single-frame TIFF images.</td>
</tr>
</table>

{% tabs %}

Expand Down Expand Up @@ -1055,7 +1076,7 @@ N> 2. By default, all monochrome images will be compressed in CITTT4 compression

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.

Essential<sup>&reg;</sup> PDF provides support for converting XPS to PDF using [XPSToPdfConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.Pdf.Base~Syncfusion.XPS.XPSToPdfConverter.html) class.
Essential<sup>&reg;</sup> PDF provides support for converting XPS to PDF using [XPSToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Base~Syncfusion.XPS.XPSToPdfConverter.html) class.

The below code illustrates how to convert XPS to PDF.

Expand Down
30 changes: 15 additions & 15 deletions Document-Processing/PDF/PDF-Library/NET/Working-with-Images.md
Original file line number Diff line number Diff line change
Expand Up @@ -1021,9 +1021,9 @@ using Syncfusion.Pdf;
using Syncfusion.Pdf.Graphics;

//Create a new PDF document
PdfDocument doc = new PdfDocument();
PdfDocument document = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
document.PageSettings.Margins.All = 0;

//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
Expand All @@ -1033,14 +1033,14 @@ int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfPage page = document.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Save and close the document
pdfDocument.Save("Sample.pdf");
pdfDocument.Close(true);
document.Save("Sample.pdf");
document.Close(true);

{% endhighlight %}

Expand All @@ -1050,9 +1050,9 @@ using Syncfusion.Pdf;
using Syncfusion.Pdf.Graphics;

//Create a PDF document
PdfDocument pdfDocument = new PdfDocument();
PdfDocument document = new PdfDocument();
//Set page margins
pdfDocument.PageSettings.Margins.All = 0;
document.PageSettings.Margins.All = 0;

//Load multi frame TIFF image
PdfBitmap tiffImage = new PdfBitmap("image.tiff");
Expand All @@ -1061,15 +1061,15 @@ int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = pdfDocument.Pages.Add();
PdfPage page = document.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}

//Save and close the document
pdfDocument.Save("Sample.pdf");
pdfDocument.Close(true);
document.Save("Sample.pdf");
document.Close(true);

{% endhighlight %}

Expand All @@ -1079,25 +1079,25 @@ Imports Syncfusion.Pdf
Imports Syncfusion.Pdf.Graphics

'Create a PDF document
Dim pdfDocument As New PdfDocument()
Dim document As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
document.PageSettings.Margins.All = 0

'Load multi frame TIFF image
Dim tiffImage As New PdfBitmap("image.tiff")
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim page As PdfPage = document.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next

'Save and close the document
pdfDocument.Save("Sample.pdf")
pdfDocument.Close(True)
document.Save("Sample.pdf")
document.Close(True)

{% endhighlight %}

Expand Down