Documentation Playground
Docs / Page Setup
Configuration

Page Setup

Control the physical dimensions, margins, and scaling of the generated PDF document. PDFKong uses standard CSS inches (e.g., 8.5in) for precision sizing.

Implementation Example

JSON Payload
{ "url": "https://example.com", // Switch to landscape mode "landscape": true, // Custom A4 size in inches "paper_width": 8.27, "paper_height": 11.69, // Set zero margins for a full-bleed PDF "margin_top": 0, "margin_bottom": 0, "margin_left": 0, "margin_right": 0 }

Page & Layout Properties

zoom Default: 1
Adjust the HTML zoom factor.

Margin Properties

margin_top Default: 0px
Margin at the top of the page in mm, cm, in, px or pt.
margin_bottom Default: 0px
Margin at the bottom of the page in mm, cm, in, px or pt.
margin_left Default: 0px
Margin at the left of the page in mm, cm, in, px or pt.
margin_right Default: 0px
Margin at the right of the page in mm, cm, in, px or pt.