You can influence the layout of the page by setting the page size, as well as the padding, margin, border and background properties of the page.
The page size can be specified using the @page property. You can either set the page size in length units or by using the page size keyword (e.g. A4). Please see the following examples.
This style sets the page size to US-Letter paper size:
@page { size: letter }In order to have the document in landscape format, you can use the following property:
@page { size: letter landscape }It is also possible to define the page size using numerical values with lenght units, e.g.:
@page { size: 12cm 30cm }In case you indicate only one value, it will be used as the documents height and width.
@page { size: 12cm }The page style of your document can be set using the following properties: padding, border, margin and background.
@page {
padding: 5mm;
border: solid 1mm;
margin: 25mm 20mm;
backgound: url(myserver/images/myimage.gif);
}In the example above, the padding of your document is 5mm for all sides, the border is solid and 1mm thick, the margin is 25mm at the top and bottom of your page, and 20mm at the sides, and the background is the image located on your server at "myserver/images/myimage.gif".
Below you can find an overview of the page size keywords supported by PDFreactor:
Table V.1. Overview of the supported page size keywords
| CSS Identifier | Size |
|---|---|
| A1 | 594mm x 841mm |
| A2 | 420mm x 594mm |
| A3 | 148mm x 210mm |
| A4 | 210mm x 297mm |
| A5 | 297mm x 420mm |
| A6 | 105mm x 148mm |
| A7 | 74mm x 105mm |
| A8 | 52mm x 74mm |
| A9 | 37mm x 52mm |
| A10 | 26mm x 37mm |
| B1 | 707mm x 1000mm |
| B2 | 500mm x 707mm |
| B3 | 353mm x 500mm |
| B4 | 176mm x 250mm |
| B5 | 250mm x 353mm |
| B6 | 125mm x 176mm |
| B7 | 88mm x 125mm |
| B8 | 62mm x 88mm |
| B9 | 44mm x 62mm |
| B10 | 31mm x 44mm |
| C1 | 648mm x 917mm |
| C2 | 458mm x 648mm |
| C3 | 324mm x 458mm |
| C4 | 229mm x 324mm |
| C5 | 162mm x 229mm |
| C6 | 114mm x 162mm |
| C7 | 81mm x 114mm |
| C8 | 57mm x 81mm |
| C9 | 40mm x 57mm |
| C10 | 28mm x 40mm |
| Letter | 8,5in x 11in |
| Legal | 8,5in x 14in |
| Ledger | 11in x 17in |
| Invoice | 5,5in x 8in |
| Executive | 7,25in x 10,5in |
| Broadsheet | 17in x 22in |