# PDF: Adjusting page margins

Changing the default PDF margins can be achieved using the Custom CSS functionality. Paste the following code in the Custom CSS field:

.sheet { 
  padding: 10mm 20mm !important; 
}

10mm - left and right margins. 20mm - top and bottom margins.

If you want to specify the margin for certain page format only you can use the following code:

body.A4 .sheet { 
  padding: 10mm 20mm !important;  
}

You can use the A3, A4, A5, letter, legal values. So if you want to have multiple rules, they should look like:

body.A3 .sheet { 
  padding: 5mm 6mm !important;  
}

body.AA .sheet { 
  padding: 7mm 8mm !important;  
}

If you want to be even more specific and only create rule for landspace layout, add the .ladnscape class:

body.A3.landscape .sheet { 
  padding: 5mm 6mm !important;  
}

# Default margins

The following margins are used by the default and can used as a reference:


body.A3 .sheet { padding: 10mm 20mm; }
body.A3.landscape .sheet { padding: 10mm 20mm; }

body.A4 .sheet { padding: 5mm 10mm; }
body.A4.landscape .sheet { padding: 5mm 10mm; }

body.A5 .sheet { padding: 3mm 6mm; }
body.A5.landscape .sheet { padding: 3mm 6mm; }

body.letter .sheet { padding: 5mm 9mm; }
body.letter.landscape .sheet { padding: 5mm 9mm; }

body.legal .sheet { padding: 5mm 9mm; }
body.legal.landscape .sheet { padding: 5mm 9mm; }