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

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

Applied various documentation corrections found while clearing up my desk!

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

  • Property mode set to 100644
File size: 7.9 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 serves as a repository for 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>, and
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
92<!-- stupid docbook-to-man can't cope with \...
93'\'
94indicates that the following character is to be interpreted as a
95control code.  So \[ means send the value 27 decimal (1B hex,
96also called 'ESC' for Escape). If the backslash is followed by a small
97x and two hex digits - e.g \x0c, then that means send the code 0C hex
98(12 decimal, also called 'FF' for FormFeed).
99-->
100followed by an 'x' followed by two hex digits represents the character
101with that hex value.  A double backslash means a literal backslash.
102</Para>
103
104<Para>
105This is all rather cryptic (printer codes inherently are) but the provided
106set-ups will work with nearly all dot matrix printers, so you are unlikely
107to need to fiddle with these runes.
108</Para>
109
110</refsect3>
111
112<refsect3><title>printhpgl</title>
113
114<Para>The definitions provided for printhpgl are:
115hpgl_generic_a4landscape,
116hpgl_generic_a1landscape, and
117hpgl_generic_a0landscape.
118</Para>
119
120</refsect3>
121
122<refsect3><title>printpcl</title>
123
124<Para>The definitions provided for printpcl are:
125pcl_generic_a4 and pcl_modern_a4.</Para>
126
127<Para>Note that if you are using a PCL printer the defaults are set
128not to use advanced printer features for compatibility. If you want to
129try these (equivalent to HP laserjet III or later), then you should
130use the modern_pcl_a4 printer definition (see below for how to do this).
131This will enable horizontal and vertical tabbing.
132</Para>
133</refsect3>
134
135<refsect3><title>printps</title>
136
137<Para>There's only one definition provided at present:
138ps_generic_a4.</Para>
139
140</refsect3>
141
142<!-- FIXME: fettle this
143<Para>If you find that your printout does not come out correctly, then the
144best way to make changes for your printer is to create a new section called
145[my_printer], and start with a like=something where something is the closest
146section to your printer. Then add new options to override the ones that are
147not correct for your printer. Finally you need to change the section for the
148type of printer you are using to point to your new definition. E.g. if you
149are using a dot-matrix printer then you need to change the [DM] section to
150say like=my_printer .
151</Para>
152-->
153
154</refsect2>
155</refsect1>
156
157<refsect1><Title>Customising Printer Settings</Title>
158
159<Para>
160The only settings most users will want to customise are which printer
161definition is used, and where to send the output.  If you're using a Dot
162Matrix Printer you will also need to set calibration details.
163</Para>
164
165<Para>You shouldn't modify the master print.ini (located in /usr/share/survex
166on Unix, or in the same directory as the Survex program files on other
167systems), or your changes will be overwritten by upgrades.  Instead create:
168</Para>
169
170<ItemizedList>
171<ListItem><Para>/etc/survex/print.ini (Unix - system-wide settings)</Para></ListItem>
172<ListItem><Para>~/.survex/print.ini (Unix - per user settings)</Para></ListItem>
173<ListItem><Para>myprint.ini in the directory where Survex is installed (other platforms)</Para></ListItem>
174</ItemizedList>
175
176<Para>
177The drivers look for the section "[dm]", "[ps]", "[pcl]" or "[hpgl]" as
178appropriate.  The file you create should should contain something like
179this to select a particular printer:
180</Para>
181
182<screen>
183[pcl]
184like=pcl_modern_a4
185</screen>
186
187<Para>
188For printdm, it should also contain calibration measurements (calibrate
189your printer by running <command>printdm --calibrate</command>):
190</Para>
191
192<screen>
193[dm]
194like=dm_24pin_a4
195mm_across_page=202
196mm_down_page=278
197</screen>
198
199<Para>
200You can override other settings too, such as the output destination.
201This is usually inherited from [base], and can be overridden in [base]
202(where it'll apply to all printer drivers) or in a printer driver
203specific section (such as [dm]).
204The output destination is set by an option of the form
205output_&lt;platform&gt=&lt;device&gt;, where device can be a device name
206(e.g. PRN, LPT1, LPT2 under &msdos;, <filename/Printer:/ under &riscos;) or a
207filename:
208</Para>
209
210<screen>
211[dm]
212output_msdos=LPT1
213like=dm_24pin_a4
214mm_across_page=202
215mm_down_page=278
216</screen>
217
218<Para><!--FIXME what else has popen? msdos too?-->
219Under &unix; output may be piped into another command like so:
220</Para>
221
222<screen>
223[base]
224; send output to printer 'oak'
225output_unix=|lpr -Poak
226</screen>
227
228<Para>Note you can also override the output setting using the --output
229command line option.
230</Para>
231
232<Para>
233If the output device isn't a device or a pipe command, it is taken as
234a filename to write the printer data to.  This can then be sent to a
235printer later.
236</Para>
237
238<caution>
239<Para>If you're using &msdos; you need to be careful when sending output
240to a file - printdm, printpcl and printhpgl all produce binary files, which
241<emphasis>must</emphasis> then be sent to the printer with
242<userinput>COPY /B OUTPUT PRN</userinput> where OUTPUT is the filename and
243PRN the device name.  Do <emphasis>not</emphasis> use COPY without the
244/B.  If you do, the output may be corrupted. Sorry, this is a deficiency
245of &msdos;, and there is nothing we can do about it.</Para>
246
247<Para>If you send output straight to the printer, by putting <filename/PRN/
248or <filename/LPT1/ in the configuration file, then this problem should not
249occur.</Para>
250
251<Para>printps produces text files as output, and so should be unaffected by
252this problem.</Para>
253</caution>
254
255<Para>
256printdm can also drive Canon bubblejets in native mode (which gives a
257higher resolution than in Epson emulation mode).  To use this,
258set "like=bj" in the "[dm]" section - like so:
259</Para>
260
261<screen>
262[dm]
263like=bj</screen>
264
265</refsect1>
Note: See TracBrowser for help on using the repository browser.