Page Size
The dimensions of a PDF page, specified in standard formats like A4, Letter, or Legal.
Common sizes: A4 (210×297mm, international standard), Letter (8.5×11", US standard), Legal (8.5×14"), Tabloid (11×17"). Specify page size when generating PDFs to ensure proper layout. Printers expect specific sizes—mismatched sizes cause scaling or cropping. APIs accept sizes by name or custom dimensions.
Exampleformat: "A4", format: "Letter", format: {width: "8.5in", height: "11in"}
Margins
The blank space between the edge of the page and the content area in a PDF.
Margins ensure content doesn't get cut off when printing and improve readability. Standard margins: 0.5-1 inch (12-25mm) on all sides. Printers often can't print to the very edge (non-printable area ~0.25"). Specify margins in CSS or PDF API parameters. Headers/footers typically sit within margin areas.
Examplemargins: {top: "1in", right: "0.75in", bottom: "1in", left: "0.75in"}
Page Breaks
CSS properties that control where content splits across pages in a PDF.
Page break properties: page-break-before (force break before element), page-break-after (force break after), page-break-inside (avoid breaking within element). Use to: start chapters on new pages, keep tables intact, prevent orphaned headings. Essential for multi-page PDFs to maintain professional layout.
Exampleh1 {page-break-before: always} /* New page for each heading */