Skip to main content

Convert HTML to PDF.

POST 

/pdf/html

Convert HTML to PDF.

Request

Header Parameters

    ipaas string

Bodyrequired

    urlstring

    The URL of the website.

    htmlstring

    The HTML source. Can be specified instead of url

    getAsUrlboolean

    Whether the result PDF should be returned as a URL. Default is false.

    Example: true
    fileNamestring

    The PDF file name. Default is a random ID.

    options object
    scalenumber

    The scale of the web app. Default is 1.

    Possible values: >= 0.1 and <= 2

    Example: 1
    displayHeaderFooterboolean

    Show header and footer. Default is false.

    Example: false
    printBackgroundboolean

    Whether to include the background in the PDF. Default is false.

    Example: false
    landscapeboolean

    Whether the PDF should be in landscape orientation. Default is false.

    Example: false
    pageRangesstring

    The page ranges to output.

    Example: 1-3,8,15-20
    formatstring

    The format of the result PDF. This overwrites the width and height settings.

    Possible values: [letter, Letter, LETTER, legal, Legal, LEGAL, tabloid, Tabloid, TABLOID, ledger, Ledger, LEDGER, a0, A0, a1, A1, a2, A2, a3, A3, a4, A4, a5, A5, a6, A6]

    Example: a4
    width object

    The width of the result PDF. Either a number in points or a string with a unit.

    anyOf
    string
    height object

    The height of the result PDF. Either a number in points or a string with a unit.

    anyOf
    string
    preferCSSPageSizeboolean

    Overwrite the format, width and height settings with the page size defined by CSS. Default is false.

    Example: false
    margin object

    The margins of the output PDF. Default is no margins.

    top object
    anyOf
    number
    bottom object
    anyOf
    number
    left object
    anyOf
    number
    right object
    anyOf
    number
    omitBackgroundboolean

    Do not use default white background, which makes the PDF transparent. Default is false.

    Example: false
    taggedboolean

    Generate accessible PDF. Default is true.

    Example: true

Responses

Success

Schema
    urlstringrequired