Menu

Configuration files

Dirk Krause
← Previous ↑ Home ↑ Administration Next →

Configuration files

Paper sizes

Syntax

Programs using DK libraries version 4 process both dk4paper.conf and dk3paper.conf files. Programs using DK libraries version 3 process only dk3paper.conf files.

All found files — see [Configuration and resource file search] — are processed cumulatively, settings in files processed later overwrite settings in files processed earlier.

The dk3paper.conf and dk4paper.conf files specify paper sizes, one per line.

Each line consists of a name, an equal sign ("=") and either 2 or 6 floating point values.

The floating point values specify dimensions in PS points (72 points per inch):

  • Paper width.
     
  • Paper height.
     
  • Left/inner border.
    When printing duplex without tumble (book), this value is used for the left border on odd pages and for right border on even pages.
     
  • Right/outer border.
    When printing duplex without tumble (book), this value is used for the right border on odd pages and for left border on even pages.
     
  • Top/inner border.
    When printing duplex with tumble (calendar), this value is used for the top border on odd pages and for bottom border on even pages.
     
  • Bottom/outer border.
    When printing duplex with tumble (calendar), this value is used for the bottom border on odd pages and for top border on even pages.

Example lines

A4  =   595 842
a4  =   595 842 56  28  14  14

In the example above we configure two paper sizes: "A4" and "a4".
Paper size names are case-sensitive. The "A4" size is 595 points wide and 842 points high. The entire sheet is used for this paper size, no borders are left.
The "a4" size also is 595 points wide and 842 points high. When using this paper size we have to leave 56 points (approximately 2cm) border on the left side, 28 points on the right side and 14 points on top and bottom.


Predefined paper sizes

Some default paper sizes are defined in the source code modules dealing with paper sizes:

Name Width Height Inner (left) border Outer (right) border Top border Bottom border
A4 595 842
Letter 612 792
A3 842 1190
A5 420 595
A6 297 420
Legal 612 1008
Tabloid 792 1224
Ledger 1224 792
Statement 396 612
Executive 540 720
Folio 612 936
Quarto 610 780
10X14 720 1008
A3landscape 1190 842
A4landscape 842 595
A5landscape 595 420
A6landscape 420 297
a4 595 842 56 28 14 14
letter 612 792 56 28 14 14
a3 842 1190 56 28 14 14
a5 420 595 42 28 14 14
a6 297 420 42 28 14 14
legal 612 1008 56 28 14 14
tabloid 792 1224 56 28 14 14
statement 396 612 42 28 14 14
executive 540 720 56 28 14 14
folio 612 936 56 28 14 14
quarto 610 780 56 28 14 14
10x14 720 1008 56 28 14 14
a3landscape 1190 842 56 28 14 14
a4landscape 842 595 42 28 14 14
a5landscape 595 420 42 28 14 14
a6landscape 420 297 42 28 14 14
← Previous ↑ Home ↑ Administration Next →

Related

Wiki: Administration
Wiki: Configuration and resource file search