Provided by: survex_220.127.116.11-2ubuntu1_i386
print.ini — survex printer settings
The print.ini file contains printer descriptions for the Survex printer
The format of the print.ini file is similar to the .ini files used on
Microsoft Windows. The file is divided into sections, each section
corresponding to a separate printer description. A section starts with
a section name in square brackets, e.g.:
followed by some options of the form <option>=<setting>, e.g.:
Most options are preceded by a comment (indicated by a semicolon ’;’)
briefly explaining the option.
Each section can contain a ’like’ option. If present this contains the
name of another section (possibly in another print.ini file). Options
not specified in the current section will be taken from that section.
This allows a printer definition to be based on that for another
similar model of printer.
Here is an example of how this works:
This says that the definition ’dm_9pin_12inch’ (for a 9pin dot matrix
printer using 12 inch paper), is just like the 11 inch definition for
the same printer, except that there are more lines per page.
Each printer driver reads a different section - printdm (the Dot Matrix
printhpgl (for HPGL plotters) reads:
printpcl (for PCL printers) reads:
printps (for Postscript printers) reads:
Several definitions are supplied for each printer driver, covering most
commonly encountered printers of each type.
The definitions provided for printdm are: dm_8pin_a4, dm_8pin_11inch,
dm_8pin_12inch, dm_9pin_a4, dm_9pin_11inch, dm_9pin_12inch,
dm_24pin_a4, dm_24pin_11inch, dm_24pin_12inch, dm_panasonic_24pin,
dm_lx86_9pin_11inch, and bj (for driving Canon BJ printers).
In the unlikely event that you need to change the printer control
codes, here is a quick overview of the format: printable characters are
literal, except for backslash. A backslash ’´ indicates that the
following character or characters are to be interpreted as a control
code, as follows: followed by an ’x’ followed by two hex digits
represents the character with that hex value; a double backslash meais
a literal backslash; is nul (0); is tab (9); is newline (10);
return (13); is escape (27); 0(1) to (26).
This is all rather cryptic (printer codes inherently are) but the
provided set-ups will work with nearly all dot matrix printers, so you
are unlikely to need to fiddle with these runes.
The definitions provided for printhpgl are: hpgl_generic_a4landscape,
hpgl_generic_a1landscape, and hpgl_generic_a0landscape.
The definitions provided for printpcl are: pcl_generic_a4 and
Note that if you are using a PCL printer the defaults are set not to
use advanced printer features for compatibility. If you want to try
these (equivalent to HP Laserjet III or later), then you should use the
modern_pcl_a4 printer definition (see below for how to do this). This
will enable horizontal and vertical tabbing.
There’s only one definition provided at present: ps_generic_a4.
Customising Printer Settings
The only settings most users will want to customise are which printer
definition is used, and where to send the output. If you’re using a
Dot Matrix Printer you will also need to set calibration details.
You shouldn’t modify the master print.ini (located in /usr/share/survex
on Unix, or in the same directory as the Survex program files on other
systems), or your changes will be overwritten by upgrades. Instead
· /etc/survex/print.ini (Unix - system-wide settings)
· ~/.survex/print.ini (Unix - per user settings)
· myprint.ini in the directory where Survex is installed (other
The drivers look for the section "[dm]", "[ps]", "[pcl]" or "[hpgl]" as
appropriate. The file you create should should contain something like
this to select a particular printer:
For printdm, it should also contain calibration measurements (calibrate
your printer by running printdm --calibrate):
You can override other settings too, such as the output destination.
This is usually inherited from [base], and can be overridden in [base]
(where it’ll apply to all printer drivers) or in a printer driver
specific section (such as [dm]). The output destination is set by an
option of the form output_<platform>=<device>, where device can be a
device name (e.g. PRN, LPT1, LPT2 under DOS, Printer: under RISC OS) or
Under UNIX output may be piped into another command like so:
; send output to printer ’oak’
Note you can also override the output setting using the --output
command line option.
If the output device isn’t a device or a pipe command, it is taken as a
filename to write the printer data to. This can then be sent to a
If you’re using DOS you need to be careful when sending output
to a file - printdm, printpcl and printhpgl all produce binary
files, which must then be sent to the printer with COPY /B
OUTPUT PRN where OUTPUT is the filename and PRN the device name.
Do not use COPY without the /B. If you do, the output may be
corrupted. Sorry, this is a deficiency of DOS, and there is
nothing we can do about it.
If you send output straight to the printer, by putting PRN or
LPT1 in the configuration file, then this problem should not
printps produces text files as output, and so should be
unaffected by this problem.
printdm can also drive Canon bubblejets in native mode (which gives a
higher resolution than in Epson emulation mode). To use this, set
"like=bj" in the "[dm]" section - like so:
printdm(1), printhpgl(1), printpcl(1), printps(1)