PhantomJsCloud Automation API
    Preparing search index...

    Interface PDFOptions

    interface PDFOptions {
        displayHeaderFooter?: boolean;
        footerTemplate?: string;
        format?: PdfFormat;
        headerTemplate?: string;
        height?: LayoutDimension;
        landscape?: boolean;
        margin?: {
            bottom?: LayoutDimension;
            left?: LayoutDimension;
            right?: LayoutDimension;
            top?: LayoutDimension;
        };
        pageRanges?: string;
        path?: string;
        preferCSSPageSize?: boolean;
        printBackground?: boolean;
        scale?: number;
        width?: LayoutDimension;
    }
    Index
    displayHeaderFooter?: boolean

    Display header and footer.

    false
    
    footerTemplate?: string

    HTML template for the print footer. Should be valid HTML markup with following classes used to inject printing values into them:

    • date formatted print date
    • title document title
    • url document location
    • pageNumber current page number
    • totalPages total pages in the document
    format?: PdfFormat

    Paper format. If set, takes priority over width or height options.

    'Letter'
    
    headerTemplate?: string

    HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:

    • date formatted print date
    • title document title
    • url document location
    • pageNumber current page number
    • totalPages total pages in the document

    Paper height.

    landscape?: boolean

    Paper orientation.

    false
    
    margin?: {
        bottom?: LayoutDimension;
        left?: LayoutDimension;
        right?: LayoutDimension;
        top?: LayoutDimension;
    }

    Paper margins, defaults to none.

    Type Declaration

    pageRanges?: string

    Paper ranges to print, e.g., '1-5, 8, 11-13'.

    '' which means print all pages.
    
    path?: string

    The file path to save the PDF to. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the PDF won't be saved to the disk.

    preferCSSPageSize?: boolean

    Give any CSS @page size declared in the page priority over what is declared in width and height or format options.

    false which will scale the content to fit the paper size.
    
    printBackground?: boolean

    Print background graphics.

    false
    
    scale?: number

    Scale of the webpage rendering. Between 0.1 and 2.

    1
    

    Paper width.