SDB:PRINTING: Setting the Page Size of ASCII files.

Şuraya atla: kullan, ara


Symptom:

When printing ASCII files, a few letters or lines are cut-off.

Cause:

The problem is that the printer cannot print too close to the edges of the paper and, therefore, the print data made by a2ps is too long or too much to be printed on the page. In the file /etc/a2ps.cfg, the page size and margins for each print media are specified. Normally, a2ps uses A4 format and, by increasing the A4 formats' margins, the print information will fit on one page.

Solution:

When you configure your printer, choose the paper size a4dj or letterdj, where bigger margins are set. For special settings, change the appropriate lines in the file /etc/a2ps.cfg:


 #################################################################
 # 1)            Definition of some media                        #
 # (Must be defined before --medium)                             #
 #################################################################
 # Medium: name, width height [llx lly urx ury]
 Medium: A3       842    1190
 Medium: A4       595     842
 Medium: A5       420     595
 Medium: B4       729    1032
 Medium: B5       516     729
 Medium: Letter   612     792
 Medium: Legal    612    1008
 Medium: Tabloid  792    1224
 Medium: Ledger  1224     792
 Medium: Statement 396    612
 Medium: Executive 540     720
 Medium: Folio    612     936
 Medium: Quarto   610     780
 Medium: 10x14    720    1008

 # Desk Jet users: bigger margins
 Medium: A4dj            595     842     24      50      571     818
 Medium: Letterdj        612     792     24      40      588     768
 

For example, increasing the A4 formats' margins looks like this:


 #################################################################
 # 1)            Definition of some media                        #
 # (Must be defined before --medium)                             #
 #################################################################
 # Medium: name, width height [llx lly urx ury]
 Medium: A3       842    1190
 Medium: A4       595     842     24      50      571     818
 Medium: A5       420     595
 Medium: B4       729    1032
 Medium: B5       516     729
 Medium: Letter   612     792
 Medium: Legal    612    1008
 Medium: Tabloid  792    1224
 Medium: Ledger  1224     792
 Medium: Statement 396    612
 Medium: Executive 540     720
 Medium: Folio    612     936
 Medium: Quarto   610     780
 Medium: 10x14    720    1008

 # Desk Jet users: bigger margins
 Medium: A4dj            595     842     24      50      571     818
 Medium: Letterdj        612     792     24      40      588     768
 

In this case, the settings for A4dj are entered.


Additional Information

Reference from of the info page for a2ps:

 Your Media

 Configuration Setting: Medium: NAME DIMENSIONS
 Define the medium NAME to have the DIMENSIONS (in PostScript
 points, i.e., 1/72 of inch).

 There are two formats supported:

 long
 in which you must give both the size of the whole sheet and
 the size of the printable area:
 # A4 for Desk Jets
 #      NAME     W      H     LLX   LLY   URX    URY
 Medium: A4dj    595    842    24    50    571    818
 where WxH are the dimension of the sheet and the four others
 stand for lower left x and y, upper right x and y.

 short
 in which a surrounding margin of 24 points is used
 # A4
 #      NAME     W      H
 Medium: A4      595    842
 is the same as
 # A4
 #      NAME     W      H
 Medium: A4      595    842    24    24    571    818
 

The info page for a2ps can be viewed with the command "info a2ps" or, using the X Window System and KDE, with kdehelp "info:(a2ps)". <keyword>printing,printer,pagesize,layout,ascii</keyword>