Margins

The margins of your pages are set in CSS on the @page rule, using the margin property. Be aware that the margin controls the size of the Margin Boxes.

To set margin consistently on all sides.

@page { margin: 20mm; }

To set the top and bottom to 20mm, and the left and right margins to 30mm.

@page { margin: 20mm 30mm; }

To set the four margins individually:

@page { margin-top: 20mm; margin-right: 30mm; margin-bottom: 40mm; margin-left: 50mm; }

To set the margin on the first page only

To set the margin on the first page only, use the :first pseudo-selector.

@page :first { margin: 20mm; }
Generate PDFs at scale, without the DevOps.
Documentation
Support