Enum AspectRatio
Specifies the primary dimension of the output image.
Namespace: Syncfusion.HtmlConverter
Assembly: Syncfusion.HtmlConverter.Base.dll
Syntax
public enum AspectRatio
Examples
//Initialize HTML to PDF converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.IE);
//Initialize the IE converter settings
IEConverterSettings ieSettings = new IEConverterSettings();
//Set AspectRatio
ieSettings.AspectRatio = AspectRatio.None;
//Assign IE settings to HTML converter
htmlConverter.ConverterSettings = ieSettings;
//Convert URL to PDF
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save the document.
document.Save("Sample.pdf");
document.Close();
'Initialize HTML to PDF converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.IE)
'Initialize the IE converter settings
Dim ieSettings As New IEConverterSettings()
'Set AspectRatio
ieSettings.AspectRatio = AspectRatio.None
'Assign IE settings to HTML converter
htmlConverter.ConverterSettings = ieSettings
'Convert URL to PDF
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save the document.
document.Save("Sample.pdf")
document.Close()
Fields
Name | Description |
---|---|
FitPageSize | keep the width and height. |
KeepHeight | Keep height fixed and proportionally change width of the image. |
KeepWidth | Keep width fixed and proportionally change height of the image. |
None | Don't apply keeping of aspect ratio. |