ConversionOptions Class
Represents options used for HTML to PDF conversion.
- Inheritance:
- System.ObjectConversionOptions
Properties
BaseAddress
Gets or sets the base address for URLs with relative location.
Property Value
- System.String
The base address for URLs with relative location.
CssMediaType
Gets or sets which media type should be used to resolve styles when converting HTML to PDF.
Property Value
Remarks
The default value is Screen.
Encoding
Gets or sets the encoding of the HTML stream.
Property Value
- System.Text.Encoding
The encoding of the HTML stream.
Remarks
The default value is System.Text.Encoding.UTF8.
PageMargins
Gets or sets the margins of a PDF document.
Property Value
Remarks
The default value is 36pt for all edges.
PageOrientation
Gets or sets the orientation of a PDF document.
public PrintPageOrientation PageOrientation { get; set; }Public Property PageOrientation As PrintPageOrientationProperty Value
Remarks
The default value is Portrait.
PageSize
Gets or sets the output paper size.
Property Value
Remarks
The Default value is 595pt x 842pt (A4 size).
Events
ResourceLoading
Occurs when external resources such as images, style sheets, scripts, and fonts are being loaded during HTML to PDF conversion. Use this event to customize or replace individual resource data.
public event EventHandler<ResourceLoadingEventArgs> ResourceLoadingPublic Event ResourceLoading As EventHandler(Of ResourceLoadingEventArgs)Event Type
- System.EventHandler<ResourceLoadingEventArgs>