Skip to content

Latest commit

 

History

History
68 lines (67 loc) · 3.39 KB

PDF Page Options.md

File metadata and controls

68 lines (67 loc) · 3.39 KB

List of all PDF Page Options

  • landscape

    • Type: bool, optional
    • Description: Paper orientation. Defaults to false.
  • displayHeaderFooter

    • Type: bool, optional
    • Description: Display header and footer. Defaults to false.
  • printBackground

    • Type: bool, optional
    • Description: Print background graphics. Defaults to false.
  • scale

    • Type: float, optional
    • Description: Scale of the webpage rendering. Defaults to 1.
  • paperWidth

    • Type: float, optional
    • Description: Paper width in inches. Defaults to 8.5 inches.
  • paperHeight

    • Type: float, optional
    • Description: Paper height in inches. Defaults to 11 inches.
  • marginTop

    • Type: float, optional
    • Description: Top margin in inches. Defaults to 1cm (~0.4 inches).
  • marginBottom

    • Type: float, optional
    • Description: Bottom margin in inches. Defaults to 1cm (~0.4 inches).
  • marginLeft

    • Type: float, optional
    • Description: Left margin in inches. Defaults to 1cm (~0.4 inches).
  • marginRight

    • Type: float, optional
    • Description: Right margin in inches. Defaults to 1cm (~0.4 inches).
  • pageRanges

    • Type: str, optional
    • Description: Paper ranges to print, one based, e.g., "1-5, 8, 11-13". Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
  • headerTemplate

    • Type: str, optional
    • Description: 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.
    • For example, <span class=title></span> would generate span containing the title.
  • footerTemplate

    • Type: str, optional
    • Description: HTML template for the print footer. Should use the same format as the headerTemplate.
  • preferCSSPageSize

    • Type: bool, optional
    • Description: Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
  • transferMode [EXPERIMENTAL => This may be changed, moved or removed]

    • Type: str, optional
    • Description: Return as stream. Allowed Values: ReturnAsBase64, ReturnAsStream. Defaults to ReturnAsBase64.
    • Pay Attention: At the moment the ReturnAsStream option doesn't work.