Enum MediaType
Specifies the media type of WebKit converter
Namespace: Syncfusion.HtmlConverter
Assembly: Syncfusion.HtmlConverter.Base.dll
Syntax
public enum MediaType
Examples
//Initialize HTML converter with WebKit rendering engine
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Set WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set print media type
webKitSettings.MediaType = MediaType.Print;
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert URL to PDF
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save the document.
document.Save("Sample.pdf");
document.Close();
'Initialize HTML converter with WebKit rendering engine
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
Dim webKitSettings As New WebKitConverterSettings()
'Set WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set print media type
webKitSettings.MediaType = MediaType.Print
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'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 |
---|---|
Print media type |
|
Screen | Screen media type |