PDF options
All available options for the PDF API endpoints.
Scales the rendering of the web page. Amount must be between 0.1
and 2
.
0.1 < x < 2
Whether to show the header and footer.
HTML template for the print header. Should be valid HTML (base64 encoded) with the following classes used to inject values into them:
date
formatted print datetitle
document titleurl
document locationpageNumber
current page numbertotalPages
total pages in the document
HTML template for the print footer. Has the same constraints and support for special classes as headerHtml
.
Set to true
to print background graphics.
Whether to print in landscape orientation.
Paper ranges to print, e.g. 1-5, 8, 11-13
.
If set, this takes priority over the width
and height
options.
The sizes of each format are as follows:
letter
8.5in x 11inlegal
8.5in x 14intabloid
11in x 17inledger
17in x 11ina0
33.1in x 46.8ina1
23.4in x 33.1ina2
16.54in x 23.4ina3
11.7in x 16.54ina4
8.27in x 11.7ina5
5.83in x 8.27ina6
4.13in x 5.83in
letter
, legal
, tabloid
, ledger
, a0
, a1
, a2
, a3
, a4
, a5
, a6
Sets the width of paper. You can pass in a number or a string with a unit.
Sets the height of paper. You can pass in a number or a string with a unit.
Give any CSS @page size declared in the page priority over what is declared in the width
or height
or format
option.
Set the PDF margins.
Hides default white background and allows generating pdfs with transparency.
Generate document outline. If this is enabled the PDF will also be tagged (accessible).
Generate tagged (accessible) PDF. This is experimental and will increase the size of the PDF.
Was this page helpful?