PDF Params
PDF Params options
Here’s a list of all the optional parameters that you can send as an object “pdfParams” while using our HTML to PDF endpoint:Whether to show the header and footer. Default:
falsestring
HTML template for the header. See valid HTML markup
bellow.
HTML template for the footer. See valid HTML markup
bellow.
boolean
Set to
true to print background graphics. Default: falseboolean
Whether to print in landscape orientation. Default:
falsePaperFormat
All the valid paper format types when printing a PDF. See all format options
here. Default:
Letterstring | number
Paper width, accepts values labeled with units.
string | number
Paper height, accepts values labeled with units.
object
Object that sets the margin of every page. See all margin options
here.
boolean
Give any CSS
@page size declared in the page priority over what is declared
in the width or height or format option. Default: falseboolean
Whether or not to embed the document outline into the PDF. Default:
falseThe width, height, and margin options accept values labeled with units. Unlabeled values are treated as pixels.All possible formats:
width: 100 (prints with width set to 100 pixels)width: ‘100px’ (prints with width set to 100 pixels)width: ‘100in’ (prints with width set to 100 inches)width: ‘100cm,’ (prints with width set to 100 centimeters)width: ‘100mm’ (prints with width set to 100 millimeters)
Header and Footer: Valid HTML Markups
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 format options
Margin Options
string | number
Top margin, accepts values labeled with units. Default:
0string | number
Right margin, accepts values labeled with units. Default:
0string | number
Left margin, accepts values labeled with units. Default:
0string | number
Bottom margin, accepts values labeled with units. Default:
0- Example: