source: git/doc/print.ini.sgml @ e5ee56e

RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereowalls-datawalls-data-hanging-as-warning
Last change on this file since e5ee56e was b4fe9fb, checked in by Olly Betts <olly@…>, 21 years ago

Merged changes with 1.0 branch.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@2437 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 7.8 KB
Line 
1<refmeta>
2<refentrytitle>print.ini</refentrytitle>
3<manvolnum>5</manvolnum>
4</refmeta>
5
6<refnamediv>
7<refname>print.ini</refname>
8<refpurpose>survex printer settings
9</refpurpose>
10</refnamediv>
11
12<refsect1><title>Description</title>
13
14<Para>
15The print.ini file contains printer descriptions for
16the Survex printer drivers.
17</Para>
18
19<refsect2><title>File Format</title>
20
21<Para>The format of the <filename>print.ini</filename> file
22is similar to the <filename>.ini</filename> files used on Microsoft Windows.
23The file is divided into sections, each section corresponding to a separate
24printer description.  A section starts with a section name
25in square brackets, e.g.:
26</Para>
27
28<screen>[generic_pcl]</screen>
29
30<Para>followed by some options of the form
31&lt;option&gt;=&lt;setting&gt;, e.g.:</Para>
32
33<screen>pixels_across_page=960</screen>
34
35<Para>Most options are preceded by a comment (indicated by a semicolon ';')
36briefly explaining the option.
37</Para>
38
39<Para>
40Each section can contain a 'like' option.  If present this contains
41the name of another section (possibly in another print.ini file).
42Options not specified in the current section will be taken from that
43section.  This allows a printer definition to be based on that
44for another similar model of printer.
45</Para>
46
47<Para>Here is an example of how this works:</Para>
48
49<screen>
50[dm_9pin_12inch]
51like=dm_11inch_9pin
52lines_down_page=108</screen>
53
54<Para>This says that the definition 'dm_9pin_12inch' (for a 9pin dot
55matrix printer using 12 inch paper), is just like the 11 inch definition
56for the same printer, except that there are more lines per page.
57</Para>
58
59<Para>Each printer driver reads a different section -
60<command>printdm</command> (the Dot Matrix driver) reads:
61<screen>[dm]</screen>
62<command>printhpgl</command> (for HPGL plotters) reads:
63<screen>[hpgl]</screen>
64<command>printpcl</command> (for PCL printers) reads:
65<screen>[pcl]</screen>
66<command>printps</command> (for Postscript printers) reads:
67<screen>[ps]</screen>
68Several definitions are supplied for each printer driver, covering
69most commonly encountered printers of each type.
70</Para>
71
72<refsect3><title>printdm</title>
73
74<Para>The definitions provided for printdm are: dm_8pin_a4,
75dm_8pin_11inch,
76dm_8pin_12inch,
77dm_9pin_a4,
78dm_9pin_11inch,
79dm_9pin_12inch,
80dm_24pin_a4,
81dm_24pin_11inch,
82dm_24pin_12inch,
83dm_panasonic_24pin,
84dm_lx86_9pin_11inch,
85and bj (for driving Canon BJ printers).
86</Para>
87
88<Para>
89In the unlikely event that you need to change the printer control
90codes, here is a quick overview of the format: printable characters
91are literal, except for backslash.  A backslash '\'
92indicates that the following character or characters are to be
93interpreted as a control code, as follows:
94\ followed by an 'x' followed by two hex digits
95represents the character with that hex value;
96a double backslash means a literal backslash;
97\0 is nul (0); \t is tab (9); \n is newline (10);
98\r is return (13); \[ is escape (27); \? is delete (127);
99\A - \Z are (1) to (26).
100</Para>
101
102<Para>
103This is all rather cryptic (printer codes inherently are) but the provided
104set-ups will work with nearly all dot matrix printers, so you are unlikely
105to need to fiddle with these runes.
106</Para>
107
108</refsect3>
109
110<refsect3><title>printhpgl</title>
111
112<Para>The definitions provided for printhpgl are:
113hpgl_generic_a4landscape,
114hpgl_generic_a1landscape, and
115hpgl_generic_a0landscape.
116</Para>
117
118</refsect3>
119
120<refsect3><title>printpcl</title>
121
122<Para>The definitions provided for printpcl are:
123pcl_generic_a4 and pcl_modern_a4.</Para>
124
125<Para>Note that if you are using a PCL printer the defaults are set
126not to use advanced printer features for compatibility. If you want to
127try these (equivalent to HP Laserjet III or later), then you should
128use the modern_pcl_a4 printer definition (see below for how to do this).
129This will enable horizontal and vertical tabbing.
130</Para>
131</refsect3>
132
133<refsect3><title>printps</title>
134
135<Para>There's only one definition provided at present:
136ps_generic_a4.</Para>
137</refsect3>
138
139<!-- FIXME: fettle this
140<Para>If you find that your printout does not come out correctly, then the
141best way to make changes for your printer is to create a new section called
142[my_printer], and start with a like=something where something is the closest
143section to your printer. Then add new options to override the ones that are
144not correct for your printer. Finally you need to change the section for the
145type of printer you are using to point to your new definition. E.g. if you
146are using a dot-matrix printer then you need to change the [DM] section to
147say like=my_printer .
148</Para>
149-->
150
151</refsect2>
152</refsect1>
153
154<refsect1><Title>Customising Printer Settings</Title>
155
156<Para>
157The only settings most users will want to customise are which printer
158definition is used, and where to send the output.  If you're using a Dot
159Matrix Printer you will also need to set calibration details.
160</Para>
161
162<Para>You shouldn't modify the master print.ini (located in /usr/share/survex
163on Unix, or in the same directory as the Survex program files on other
164systems), or your changes will be overwritten by upgrades.  Instead create:
165</Para>
166
167<ItemizedList>
168<ListItem><Para>/etc/survex/print.ini (Unix - system-wide settings)</Para></ListItem>
169<ListItem><Para>~/.survex/print.ini (Unix - per user settings)</Para></ListItem>
170<ListItem><Para>myprint.ini in the directory where Survex is installed (other platforms)</Para></ListItem>
171</ItemizedList>
172
173<Para>
174The drivers look for the section "[dm]", "[ps]", "[pcl]" or "[hpgl]" as
175appropriate.  The file you create should should contain something like
176this to select a particular printer:
177</Para>
178
179<screen>
180[pcl]
181like=pcl_modern_a4
182</screen>
183
184<Para>
185For printdm, it should also contain calibration measurements (calibrate
186your printer by running <command>printdm --calibrate</command>):
187</Para>
188
189<screen>
190[dm]
191like=dm_24pin_a4
192mm_across_page=202
193mm_down_page=278
194</screen>
195
196<Para>
197You can override other settings too, such as the output destination.
198This is usually inherited from [base], and can be overridden in [base]
199(where it'll apply to all printer drivers) or in a printer driver
200specific section (such as [dm]).
201The output destination is set by an option of the form
202output_&lt;platform&gt=&lt;device&gt;, where device can be a device name
203(e.g. PRN, LPT1, LPT2 under &msdos;, <filename/Printer:/ under &riscos;) or a
204filename:
205</Para>
206
207<screen>
208[dm]
209output_msdos=LPT1
210like=dm_24pin_a4
211mm_across_page=202
212mm_down_page=278
213</screen>
214
215<Para><!--FIXME what else has popen? msdos too?-->
216Under &unix; output may be piped into another command like so:
217</Para>
218
219<screen>
220[base]
221; send output to printer 'oak'
222output_unix=|lpr -Poak
223</screen>
224
225<Para>Note you can also override the output setting using the --output
226command line option.
227</Para>
228
229<Para>
230If the output device isn't a device or a pipe command, it is taken as
231a filename to write the printer data to.  This can then be sent to a
232printer later.
233</Para>
234
235<caution>
236<Para>If you're using &msdos; you need to be careful when sending output
237to a file - printdm, printpcl and printhpgl all produce binary files, which
238<emphasis>must</emphasis> then be sent to the printer with
239<userinput>COPY /B OUTPUT PRN</userinput> where OUTPUT is the filename and
240PRN the device name.  Do <emphasis>not</emphasis> use COPY without the
241/B.  If you do, the output may be corrupted. Sorry, this is a deficiency
242of &msdos;, and there is nothing we can do about it.</Para>
243
244<Para>If you send output straight to the printer, by putting <filename/PRN/
245or <filename/LPT1/ in the configuration file, then this problem should not
246occur.</Para>
247
248<Para>printps produces text files as output, and so should be unaffected by
249this problem.</Para>
250</caution>
251
252<Para>
253printdm can also drive Canon bubblejets in native mode (which gives a
254higher resolution than in Epson emulation mode).  To use this,
255set "like=bj" in the "[dm]" section - like so:
256</Para>
257
258<screen>
259[dm]
260like=bj</screen>
261
262</refsect1>
Note: See TracBrowser for help on using the repository browser.