Skip to content

Commit d0a3898

Browse files
Merge pull request #1921 from syncfusion-content/997972-ug
997972-ug: Resolved the UG failures in PDF library
2 parents 37d2293 + ae1f2b1 commit d0a3898

File tree

3 files changed

+52
-31
lines changed

3 files changed

+52
-31
lines changed

Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5742,7 +5742,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
57425742

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

5745-
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.
5745+
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.
57465746

57475747
{% tabs %}
57485748

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

57685768
//Save the document
5769-
lDoc.Save("Output.pdf");
5769+
ldoc.Save("Output.pdf");
57705770
//Closes the document
57715771
ldoc.Close(true);
57725772
{% endhighlight %}

Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For ASP.NET Core and Xamarin applications
8383
* using Syncfusion.DocIORenderer
8484
* using Syncfusion.Pdf
8585

86-
[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.
86+
[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.
8787

8888
{% tabs %}
8989

@@ -162,13 +162,13 @@ wordDocument.Close()
162162
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).
163163

164164
Note:
165-
* 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.
166-
* [ChartToImageConverter](https://help.syncfusion.com/cr/document-processings/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is supported from .NET Framework 4.0 onwards.
165+
* 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.
166+
* [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) is supported from .NET Framework 4.0 onwards.
167167
* Total number of pages may vary based on unsupported elements in the converted PDF document when compare to Word document.
168168

169169
### Customizing the Word document to PDF conversion
170170

171-
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:
171+
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:
172172

173173
* Allows to determine the quality of the charts in the converted PDF.
174174
* Allows to determine the quality of the JPEG images in the converted PDF.
@@ -258,7 +258,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
258258

259259
## Converting Excel documents to PDF
260260

261-
[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.
261+
[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.
262262

263263
* [Assemblies Information](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/assemblies-required#converting-excel-document-to-pdf)
264264
* [NuGet Information](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/nuget-packages-required#converting-excel-document-to-pdf)
@@ -267,7 +267,7 @@ N> Excel to PDF conversion works proper in Blazor server-side alone and not in c
267267

268268
### Converting a Workbook to PDF
269269

270-
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.
270+
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.
271271

272272
{% tabs %}
273273

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

347347
### Converting a Worksheet to PDF
348348

349-
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.
349+
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.
350350

351351
{% tabs %}
352352

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

434434
### Creating individual PDF document for each worksheet
435435

436-
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.
436+
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.
437437

438438
{% tabs %}
439439

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

525525
### Excel with Chart to PDF
526526

527-
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.
527+
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.
528528

529529
{% tabs %}
530530

@@ -698,7 +698,7 @@ For ASP.NET Core and Xamarin applications
698698
* using Syncfusion.DocIORenderer
699699
* using Syncfusion.Pdf
700700

701-
[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.
701+
[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.
702702

703703
{% tabs %}
704704

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

775775
### Customizing the RTF to PDF conversion
776776

777-
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:
777+
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:
778778

779779
* Allows to determine the quality of the JPEG images in the converted PDF.
780780
* Allows to reduce the Main Memory usage in RTF to PDF conversion by reusing the identical images.
@@ -851,7 +851,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
851851

852852
### Converting multi page TIFF to PDF
853853

854-
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.
854+
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.
855855

856856
The code snippet to illustrate the same is given below.
857857

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

986986
Essential<sup>&reg;</sup> PDF supports JBIG2 compression for best compression of monochrome images.
987987

988-
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.
988+
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.
989+
990+
<table border="1">
991+
<th style="font-size:14px" width="100px">Encoding Type</th>
992+
<th style="font-size:14px">Image Type</th>
993+
<th style="font-size:14px">Compression Applied</th>
994+
<tr>
995+
<td>Default</td>
996+
<td>All images</td>
997+
<td>Applies <b>Deflate (DEFLATE)</b> compression to monochrome, grayscale, and color images.</td>
998+
</tr>
999+
<tr>
1000+
<td>Default</td>
1001+
<td>TIFF images</td>
1002+
<td>Monochrome TIFF images use <b>CCITT Group 4 (CCITT4)</b> compression by default.</td>
1003+
</tr>
1004+
<tr>
1005+
<td>JBIG2</td>
1006+
<td>All images</td>
1007+
<td>Supported only in lossy mode and only for single-frame TIFF images.</td>
1008+
</tr>
1009+
</table>
9891010

9901011
{% tabs %}
9911012

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

10561077
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.
10571078

1058-
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.
1079+
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.
10591080

10601081
The below code illustrates how to convert XPS to PDF.
10611082

Document-Processing/PDF/PDF-Library/NET/Working-with-Images.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,9 +1021,9 @@ using Syncfusion.Pdf;
10211021
using Syncfusion.Pdf.Graphics;
10221022

10231023
//Create a new PDF document
1024-
PdfDocument doc = new PdfDocument();
1024+
PdfDocument document = new PdfDocument();
10251025
//Set page margins
1026-
doc.PageSettings.Margins.All = 0;
1026+
document.PageSettings.Margins.All = 0;
10271027

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

10451045
{% endhighlight %}
10461046

@@ -1050,9 +1050,9 @@ using Syncfusion.Pdf;
10501050
using Syncfusion.Pdf.Graphics;
10511051

10521052
//Create a PDF document
1053-
PdfDocument pdfDocument = new PdfDocument();
1053+
PdfDocument document = new PdfDocument();
10541054
//Set page margins
1055-
pdfDocument.PageSettings.Margins.All = 0;
1055+
document.PageSettings.Margins.All = 0;
10561056

10571057
//Load multi frame TIFF image
10581058
PdfBitmap tiffImage = new PdfBitmap("image.tiff");
@@ -1061,15 +1061,15 @@ int frameCount = tiffImage.FrameCount;
10611061
//Access each frame and draw into the page
10621062
for (int i = 0; i < frameCount; i++)
10631063
{
1064-
PdfPage page = pdfDocument.Pages.Add();
1064+
PdfPage page = document.Pages.Add();
10651065
PdfGraphics graphics = page.Graphics;
10661066
tiffImage.ActiveFrame = i;
10671067
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
10681068
}
10691069

10701070
//Save and close the document
1071-
pdfDocument.Save("Sample.pdf");
1072-
pdfDocument.Close(true);
1071+
document.Save("Sample.pdf");
1072+
document.Close(true);
10731073

10741074
{% endhighlight %}
10751075

@@ -1079,25 +1079,25 @@ Imports Syncfusion.Pdf
10791079
Imports Syncfusion.Pdf.Graphics
10801080

10811081
'Create a PDF document
1082-
Dim pdfDocument As New PdfDocument()
1082+
Dim document As New PdfDocument()
10831083
'Set page margins
1084-
pdfDocument.PageSettings.Margins.All = 0
1084+
document.PageSettings.Margins.All = 0
10851085

10861086
'Load multi frame TIFF image
10871087
Dim tiffImage As New PdfBitmap("image.tiff")
10881088
'Get the frame count
10891089
Dim frameCount As Integer = tiffImage.FrameCount
10901090
'Access each frame and draw into the page
10911091
For i As Integer = 0 To frameCount - 1
1092-
Dim page As PdfPage = pdfDocument.Pages.Add()
1092+
Dim page As PdfPage = document.Pages.Add()
10931093
Dim graphics As PdfGraphics = page.Graphics
10941094
tiffImage.ActiveFrame = i
10951095
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
10961096
Next
10971097

10981098
'Save and close the document
1099-
pdfDocument.Save("Sample.pdf")
1100-
pdfDocument.Close(True)
1099+
document.Save("Sample.pdf")
1100+
document.Close(True)
11011101

11021102
{% endhighlight %}
11031103

0 commit comments

Comments
 (0)