Skip to content

Commit 79af6fa

Browse files
Merge pull request #2010 from syncfusion-content/1000184-hotfix
1000184-hotfix: Added missing md files in PDF UG documentation.
2 parents 888aa93 + 5401a82 commit 79af6fa

File tree

6 files changed

+354
-86
lines changed

6 files changed

+354
-86
lines changed

Document-Processing-toc.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,7 @@
25372537
<a href="/document-processing/pdf/pdf-library/net/working-with-JavaScript">Working with JavaScript</a>
25382538
</li>
25392539
<li>
2540-
<a href="/document-processing/pdf/pdf-library/net/Performance-Metrics">Performance Metrics</a>
2540+
<a href="/document-processing/pdf/pdf-library/net/performance-metrics">Performance Metrics</a>
25412541
</li>
25422542
<li>
25432543
FAQ
@@ -2772,7 +2772,7 @@
27722772
<a href="/document-processing/pdf/conversions/html-to-pdf/net/features">Features</a>
27732773
</li>
27742774
<li>
2775-
<a href="/document-processing/pdf/conversions/html-to-pdf/net/Performance-Metrics">Performance Metrics</a>
2775+
<a href="/document-processing/pdf/conversions/html-to-pdf/net/performance-metrics">Performance Metrics</a>
27762776
</li>
27772777
<li>
27782778
<a href="/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation">Advanced Installation</a>

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/features.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,96 @@ padding-left: 5px;
807807

808808
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/Create-custom-style-TOC-when-converting-HTML-to-PDF).
809809

810+
## Exclude cover page from TOC
811+
812+
This code snippet shows how to configure the Table of Contents (TOC) to skip the cover page by setting the starting page number. In this example, the cover page is a single page, so the TOC begins at page 1. For documents with multiple cover pages, adjust the starting page number as needed.
813+
814+
{% tabs %}
815+
816+
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/HTML%20to%20PDF/Blink/Skip-cover-page-in-TOC-page-numbering/.NET/Skip-cover-page-in-TOC-page-numbering/Program.cs, 300" %}
817+
818+
using Syncfusion.Drawing;
819+
using Syncfusion.HtmlConverter;
820+
using Syncfusion.Pdf;
821+
822+
// Create an instance of HTML-to-PDF converter
823+
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
824+
// Configure Blink converter settings
825+
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings()
826+
{
827+
ViewPortSize = new Size(1280, 0), // Set viewport width for rendering
828+
EnableToc = true, // Enable Table of Contents (TOC)
829+
};
830+
// Set TOC starting page number to skip the cover page
831+
blinkConverterSettings.Toc.StartingPageNumber = 1;
832+
// Apply the settings to the converter
833+
htmlConverter.ConverterSettings = blinkConverterSettings;
834+
// Read the main HTML content and convert it to PDF
835+
string inputhtml = File.ReadAllText("input.html");
836+
PdfDocument document = htmlConverter.Convert(inputhtml, "");
837+
//Create cover page and insert to the 0th index.
838+
// Apply scaling settings for the cover page
839+
htmlConverter.ConverterSettings = new BlinkConverterSettings()
840+
{
841+
Scale = 1.5f
842+
};
843+
// Convert the cover page HTML to PDF
844+
string coverimage = File.ReadAllText("coverpage.html");
845+
PdfDocument coverPage = htmlConverter.Convert(coverimage, "");
846+
// Insert the cover page at the beginning of the main document
847+
document.Pages.Insert(0, coverPage.Pages[0]);
848+
// Save the PDF document
849+
document.Save("Output.pdf");
850+
//Dispose the document
851+
coverPage.Close(true);
852+
document.Close(true);
853+
htmlConverter.Close();
854+
855+
{% endhighlight %}
856+
857+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
858+
859+
Imports Syncfusion.Drawing
860+
Imports Syncfusion.HtmlConverter
861+
Imports Syncfusion.Pdf
862+
863+
' Create an instance of HTML-to-PDF converter
864+
Dim htmlConverter As New HtmlToPdfConverter()
865+
' Configure Blink converter settings
866+
Dim blinkConverterSettings As New BlinkConverterSettings() With {
867+
.ViewPortSize = New Size(1280, 0), ' Set viewport width for rendering
868+
.EnableToc = True ' Enable Table of Contents (TOC)
869+
}
870+
' Set TOC starting page number to skip the cover page
871+
blinkConverterSettings.Toc.StartingPageNumber = 1
872+
' Apply the settings to the converter
873+
htmlConverter.ConverterSettings = blinkConverterSettings
874+
' Read the main HTML content and convert it to PDF
875+
Dim inputhtml As String = File.ReadAllText("input.html")
876+
Dim document As PdfDocument = htmlConverter.Convert(inputhtml, "")
877+
' Create cover page and insert to the 0th index.
878+
' Apply scaling settings for the cover page
879+
htmlConverter.ConverterSettings = New BlinkConverterSettings() With {
880+
.Scale = 1.5F
881+
}
882+
' Convert the cover page HTML to PDF
883+
Dim coverimage As String = File.ReadAllText("coverpage.html")
884+
Dim coverPage As PdfDocument = htmlConverter.Convert(coverimage, "")
885+
' Insert the cover page at the beginning of the main document
886+
document.Pages.Insert(0, coverPage.Pages(0))
887+
' Save the PDF document
888+
document.Save("Output.pdf")
889+
' Dispose the documents
890+
coverPage.Close(True)
891+
document.Close(True)
892+
htmlConverter.Close()
893+
894+
{% endhighlight %}
895+
896+
{% endtabs %}
897+
898+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/Skip-cover-page-in-TOC-page-numbering/.NET).
899+
810900
## Media Type
811901

812902
The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports <b>Screen</b> and <b>Print</b> media types. Refer to the following code snippet to select Print [MediaType](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html#Syncfusion_HtmlConverter_BlinkConverterSettings_MediaType).
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Performance Metrics of Syncfusion HTML-to-PDF Conversion
3+
description: This section provides a detailed overview of the performance metrics and capabilities of the HTML-to-PDF conversion library.
4+
platform: document-processing
5+
control: PDF
6+
documentation: UG
7+
---
8+
9+
# HTML to PDF Performance Benchmarks
10+
11+
The Syncfusion<sup>&reg;</sup> [HTML to PDF library](https://www.syncfusion.com/document-sdk/net-pdf-library/html-to-pdf) delivers high-performance APIs to convert web content into PDF documents programmatically. This performance benchmark report highlights the speed and efficiency of HTML-to-PDF conversion, showcasing how the library manages large-scale document rendering in real-world scenarios.
12+
13+
## Environment Details
14+
15+
The following system configurations were used for benchmarking:
16+
17+
OS Edition : Windows 11 Enterprise
18+
Version : 22H2
19+
Processor : 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz
20+
Installed RAM : 20.0 GB (19.7 GB usable)
21+
System type : 64-bit operating system, x64-based processor
22+
23+
## Example Application
24+
25+
The benchmark details were obtained using the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) package. You can refer to the following sample, as well as the input and output files used:
26+
27+
Input HTML files : [Input HTML files](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data)
28+
29+
Output PDF files : [Output document](https://www.syncfusion.com/downloads/support/directtrac/general/ze/Output-924807763.zip)
30+
31+
## Results
32+
33+
<table border="1">
34+
<th style="font-size:14px" width="100px">Input Page count</th>
35+
<th style="font-size:14px">Conversion time
36+
37+
(Avg value of 5 conversions)
38+
</th>
39+
<th style="font-size:14px">Process Memory and CPU usage
40+
</th>
41+
<tr>
42+
<td>10+ Pages</td>
43+
<td>2.78 seconds</td>
44+
<td>
45+
Memory usage: 318 MB
46+
47+
CPU usage: 10%</td>
48+
</tr>
49+
<tr>
50+
<td>100+ pages</td>
51+
<td>3.65 seconds</td>
52+
<td>Memory usage: 367 MB
53+
54+
CPU usage: 14%</td>
55+
</tr>
56+
<tr>
57+
<td>1000+ pages</td>
58+
<td>6.72 seconds</td>
59+
<td>Memory usage: 813 MB
60+
61+
CPU usage: 27%</td>
62+
</tr>
63+
<tr>
64+
<td>10 documents with 100+ pages in a loop</td>
65+
<td>30.52 seconds</td>
66+
<td>
67+
Memory usage: 663 MB
68+
69+
CPU usage: 15%</td>
70+
</tr>
71+
<tr>
72+
<td>10 documents with 1000+ pages in a loop</td>
73+
<td>1 minute 10 seconds</td>
74+
<td>
75+
Memory usage: 2.2 GB
76+
77+
CPU usage: 64%</td>
78+
</tr>
79+
</table>
80+
81+
N> The performance metrics were recorded on a freshly configured machine. Speed and memory usage may vary if the machine is running other processes. Additionally, performance can be affected by:
82+
N> * External resources loaded in the HTML (such as images, scripts, and styles)
83+
N> * Network speed for online URL conversions
84+
N> * Hardware resources (CPU and memory)
85+
86+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Performance_Testing/Syncfusion_HTMLtoPDF).

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,90 +1094,6 @@ fileStream.Dispose();
10941094

10951095
</table>
10961096

1097-
## HTML to PDF Performance Benchmarks:
1098-
1099-
We have prepared the following benchmark details for converting HTML to PDF, using the specified machine configuration and input HTML files:
1100-
1101-
<h2>Environment Details:</h2>
1102-
1103-
1104-
OS Edition : Windows 11 Enterprise
1105-
1106-
Version : 22H2
1107-
1108-
Processor : 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz
1109-
1110-
Installed RAM : 20.0 GB (19.7 GB usable)
1111-
1112-
System type : 64-bit operating system, x64-based processor
1113-
1114-
1115-
<h2>Example Application:</h2>
1116-
1117-
The benchmark details were obtained using the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) package. You can refer to the following sample, as well as the input and output files used:
1118-
1119-
Input HTML files : <a href="https://github.com/SyncfusionExamples/html_to_pdf_conversion/tree/main/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data">https://github.com/SyncfusionExamples/html_to_pdf_conversion/tree/main/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data</a>
1120-
1121-
Output PDF files : <a href="https://www.syncfusion.com/downloads/support/directtrac/general/ze/Output-924807763.zip">https://www.syncfusion.com/downloads/support/directtrac/general/ze/Output-924807763.zip</a>
1122-
1123-
<h2>Results:</h2>
1124-
1125-
<table border="1">
1126-
<th style="font-size:14px" width="100px">Input Page count</th>
1127-
<th style="font-size:14px">Conversion time
1128-
1129-
(Avg value of 5 conversions)
1130-
</th>
1131-
<th style="font-size:14px">Process Memory and CPU usage
1132-
</th>
1133-
<tr>
1134-
<td>10+ Pages</td>
1135-
<td>2.78 seconds</td>
1136-
<td>
1137-
Memory usage: 318 MB
1138-
1139-
CPU usage: 10%</td>
1140-
</tr>
1141-
<tr>
1142-
<td>100+ pages</td>
1143-
<td>3.65 seconds</td>
1144-
<td>Memory usage: 367 MB
1145-
1146-
CPU usage: 14%</td>
1147-
</tr>
1148-
<tr>
1149-
<td>1000+ pages</td>
1150-
<td>6.72 seconds</td>
1151-
<td>Memory usage: 813 MB
1152-
1153-
CPU usage: 27%</td>
1154-
</tr>
1155-
<tr>
1156-
<td>10 documents with 100+ pages in a loop</td>
1157-
<td>30.52 seconds</td>
1158-
<td>
1159-
Memory usage: 663 MB
1160-
1161-
CPU usage: 15%</td>
1162-
</tr>
1163-
<tr>
1164-
<td>10 documents with 1000+ pages in a loop</td>
1165-
<td>1 minute 10 seconds</td>
1166-
<td>
1167-
Memory usage: 2.2 GB
1168-
1169-
CPU usage: 64%</td>
1170-
</tr>
1171-
</table>
1172-
1173-
N> The performance metrics were recorded on a freshly configured machine. Speed and memory usage may vary if the machine is running other processes. Additionally, performance can be affected by:
1174-
1175-
N> * External resources loaded in the HTML (such as images, scripts, and styles)
1176-
N> * Network speed for online URL conversions
1177-
N> * Hardware resources (CPU and memory)
1178-
1179-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Performance_Testing/Syncfusion_HTMLtoPDF).
1180-
11811097
## Custom fonts are not rendered in Azure App Service and Function Linux using Blink.
11821098

11831099
<table>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Layers, also known as Option Content refers to sections of content in a PDF docu
1212

1313
Essential<sup>&reg;</sup> PDF provides support to create, add and merge the layers into PDF document.
1414

15+
Check the following video to learn how to work with PDF layers using the .NET PDF Library.
16+
{% youtube "https://youtu.be/xvQ7yM0Pddk?si=T8guG9seZNX09pFb" %}
17+
1518
## Adding Layers in a PDF document
1619

1720
Essential<sup>&reg;</sup> PDF allows the users to create a layer in a PDF page using [PdfPageLayer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageLayer.html) class. The below code example illustrates how to add the multiple layers in a new PDF document.

0 commit comments

Comments
 (0)