Class SinglePageLayout
Use this option to render the whole HTML content into a single PDF page
Inheritance
System.Object
SinglePageLayout
Namespace: Syncfusion.Pdf.HtmlToPdf
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public sealed class SinglePageLayout : Enum
Examples
/// //Initialize HTML to PDF converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Create a new instance for webkit converter settings.
WebKitConverterSettings settings = new WebKitConverterSettings();
//Set WebKit path
settings.WebKitPath = @"QtBinaries";
//Set signle page layout.
settings.SinglePageLayout = SinglePageLayout.FitHeight;
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = settings;
//Convert URL to PDF
PdfDocument document = htmlConverter.Convert("https://en.wikipedia.org/wiki/.NET_Framework");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML to PDF converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Create a new instance for webkit converter settings.
Dim settings As New WebKitConverterSettings()
'Set WebKit path
settings.WebKitPath = "QtBinaries"
'Set signle page layout.
settings.SinglePageLayout = SinglePageLayout.FitHeight
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = settings
'Convert URL to PDF
Dim document As PdfDocument = htmlConverter.Convert("https://en.wikipedia.org/wiki/.NET_Framework")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Fields
FitHeight
The page height is not resized to fit the HTML content PDF page
Declaration
public const SinglePageLayout FitHeight
Field Value
Type |
---|
SinglePageLayout |
FitWidth
The page width is not resized to fit the HTML content to PDF page
Declaration
public const SinglePageLayout FitWidth
Field Value
Type |
---|
SinglePageLayout |
None
Do not apply single page layout
Declaration
public const SinglePageLayout None
Field Value
Type |
---|
SinglePageLayout |