GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricing

    Show / Hide Table of Contents

    ConversionOptions Class

    Namespace:
    GemBox.Pdf.Html
    Assembly:
    GemBox.Pdf.Html.Core.dll

    Represents options used for HTML to PDF conversion.

    • C#
    • VB.NET
    public class ConversionOptions
    Public Class ConversionOptions
    Inheritance:
    System.Object
    ConversionOptions

    Properties

    BaseAddress

    Gets or sets the base address for URLs with relative location.

    • C#
    • VB.NET
    public string BaseAddress { get; set; }
    Public Property BaseAddress As String
    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.

    • C#
    • VB.NET
    public CssMediaType CssMediaType { get; set; }
    Public Property CssMediaType As CssMediaType
    Property Value
    CssMediaType
    Remarks

    The default value is Screen.

    Encoding

    Gets or sets the encoding of the HTML stream.

    • C#
    • VB.NET
    public Encoding Encoding { get; set; }
    Public Property Encoding As Encoding
    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.

    • C#
    • VB.NET
    public PdfPadding PageMargins { get; set; }
    Public Property PageMargins As PdfPadding
    Property Value
    PdfPadding
    Remarks

    The default value is 36pt for all edges.

    PageOrientation

    Gets or sets the orientation of a PDF document.

    • C#
    • VB.NET
    public PrintPageOrientation PageOrientation { get; set; }
    Public Property PageOrientation As PrintPageOrientation
    Property Value
    PrintPageOrientation
    Remarks

    The default value is Portrait.

    PageSize

    Gets or sets the output paper size.

    • C#
    • VB.NET
    public PdfSize PageSize { get; set; }
    Public Property PageSize As PdfSize
    Property Value
    PdfSize
    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.

    • C#
    • VB.NET
    public event EventHandler<ResourceLoadingEventArgs> ResourceLoading
    Public Event ResourceLoading As EventHandler(Of ResourceLoadingEventArgs)
    Event Type
    System.EventHandler<ResourceLoadingEventArgs>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.