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> |
---|
15 | The print.ini file serves as a repository for printer descriptions for |
---|
16 | the Survex printer drivers. |
---|
17 | </Para> |
---|
18 | |
---|
19 | <refsect2><title>File Format</title> |
---|
20 | |
---|
21 | <Para>The format of the <filename>print.ini</filename> file |
---|
22 | is similar to the <filename>.ini</filename> files used on Microsoft Windows. |
---|
23 | The file is divided into sections, each section corresponding to a separate |
---|
24 | printer description. A section starts with a section name |
---|
25 | in square brackets, e.g.: |
---|
26 | </Para> |
---|
27 | |
---|
28 | <screen>[generic_pcl]</screen> |
---|
29 | |
---|
30 | <Para>followed by some options of the form |
---|
31 | <option>=<setting>, 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 ';') |
---|
36 | briefly explaining the option. |
---|
37 | </Para> |
---|
38 | |
---|
39 | <Para> |
---|
40 | Each section can contain a 'like' option. If present this contains |
---|
41 | the name of another section (possibly in another print.ini file). |
---|
42 | Options not specified in the current section will be taken from that |
---|
43 | section. This allows a printer definition to be based on that |
---|
44 | for 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] |
---|
51 | like=dm_11inch_9pin |
---|
52 | lines_down_page=108</screen> |
---|
53 | |
---|
54 | <Para>This says that the definition 'dm_9pin_12inch' (for a 9pin dot |
---|
55 | matrix printer using 12 inch paper), is just like the 11 inch definition |
---|
56 | for 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>. |
---|
68 | Several definitions are supplied for each printer driver, covering |
---|
69 | most 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, |
---|
75 | dm_8pin_11inch, |
---|
76 | dm_8pin_12inch, |
---|
77 | dm_9pin_a4, |
---|
78 | dm_9pin_11inch, |
---|
79 | dm_9pin_12inch, |
---|
80 | dm_24pin_a4, |
---|
81 | dm_24pin_11inch, |
---|
82 | dm_24pin_12inch, |
---|
83 | dm_panasonic_24pin, |
---|
84 | dm_lx86_9pin_11inch, |
---|
85 | and bj (for driving Canon BJ printers). |
---|
86 | </Para> |
---|
87 | |
---|
88 | <Para> |
---|
89 | In the unlikely event that you need to change the printer control |
---|
90 | codes, here is a quick overview of the format: printable characters |
---|
91 | are literal, except for backslash. A backslash |
---|
92 | <!-- stupid docbook-to-man can't cope with \... |
---|
93 | '\' |
---|
94 | indicates that the following character is to be interpreted as a |
---|
95 | control code. So \[ means send the value 27 decimal (1B hex, |
---|
96 | also called 'ESC' for Escape). If the backslash is followed by a small |
---|
97 | x and two hex digits - e.g \x0c, then that means send the code 0C hex |
---|
98 | (12 decimal, also called 'FF' for FormFeed). |
---|
99 | --> |
---|
100 | followed by an 'x' followed by two hex digits represents the character |
---|
101 | with that hex value. A double backslash means a literal backslash. |
---|
102 | </Para> |
---|
103 | |
---|
104 | <Para> |
---|
105 | This is all rather cryptic (printer codes inherently are) but the provided |
---|
106 | set-ups will work with nearly all dot matrix printers, so you are unlikely |
---|
107 | to 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: |
---|
115 | hpgl_generic_a4landscape, |
---|
116 | hpgl_generic_a1landscape, and |
---|
117 | hpgl_generic_a0landscape. |
---|
118 | </Para> |
---|
119 | |
---|
120 | </refsect3> |
---|
121 | |
---|
122 | <refsect3><title>printpcl</title> |
---|
123 | |
---|
124 | <Para>The definitions provided for printpcl are: |
---|
125 | pcl_generic_a4 and pcl_modern_a4.</Para> |
---|
126 | |
---|
127 | <Para>Note that if you are using a PCL printer the defaults are set |
---|
128 | not to use advanced printer features for compatibility. If you want to |
---|
129 | try these (equivalent to HP laserjet III or later), then you should |
---|
130 | use the modern_pcl_a4 printer definition (see below for how to do this). |
---|
131 | This will enable horizontal and vertical tabbing. |
---|
132 | </Para> |
---|
133 | </refsect3> |
---|
134 | |
---|
135 | <refsect3><title>printhpgl</title> |
---|
136 | |
---|
137 | <Para>There's only one definition provided at present: |
---|
138 | ps_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 |
---|
144 | best 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 |
---|
146 | section to your printer. Then add new options to override the ones that are |
---|
147 | not correct for your printer. Finally you need to change the section for the |
---|
148 | type of printer you are using to point to your new definition. E.g. if you |
---|
149 | are using a dot-matrix printer then you need to change the [DM] section to |
---|
150 | say like=my_printer . |
---|
151 | </Para> |
---|
152 | --> |
---|
153 | |
---|
154 | </refsect2> |
---|
155 | </refsect1> |
---|
156 | |
---|
157 | <refsect1><Title>Customising Printer Settings</Title> |
---|
158 | |
---|
159 | <Para> |
---|
160 | The only settings most users will want to customise are which printer |
---|
161 | definition is used, and where to send the output. If you're using a Dot |
---|
162 | Matrix 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 |
---|
166 | on Unix, or in the same directory as the Survex program files on other |
---|
167 | systems), 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> |
---|
177 | The drivers look for the section "[dm]", "[ps]", "[pcl]" or "[hpgl]" as |
---|
178 | appropriate. The file you create should should contain something like |
---|
179 | this to select a particular printer: |
---|
180 | </Para> |
---|
181 | |
---|
182 | <screen> |
---|
183 | [pcl] |
---|
184 | like=pcl_modern_a4 |
---|
185 | </screen> |
---|
186 | |
---|
187 | <Para> |
---|
188 | For printdm, it should also contain calibration measurements (calibrate |
---|
189 | your printer by running <command>printdm --calibrate</command>): |
---|
190 | </Para> |
---|
191 | |
---|
192 | <screen> |
---|
193 | [dm] |
---|
194 | like=dm_24pin_a4 |
---|
195 | mm_across_page=202 |
---|
196 | mm_down_page=278 |
---|
197 | </screen> |
---|
198 | |
---|
199 | <Para> |
---|
200 | You can override other settings too, such as the output destination. |
---|
201 | This 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 |
---|
203 | specific section (such as [dm]). |
---|
204 | The output destination is set by an option of the form |
---|
205 | output_<platform>=<device>, where device can be a device name |
---|
206 | (e.g. PRN, LPT1, LPT2 under &msdos;, <filename/Printer:/ under &riscos;) or a |
---|
207 | filename: |
---|
208 | </Para> |
---|
209 | |
---|
210 | <screen> |
---|
211 | [dm] |
---|
212 | output_msdos=LPT1 |
---|
213 | like=dm_24pin_a4 |
---|
214 | mm_across_page=202 |
---|
215 | mm_down_page=278 |
---|
216 | </screen> |
---|
217 | |
---|
218 | <Para><!--FIXME what else has popen? msdos too?--> |
---|
219 | Under &unix; output may be piped into another command like so: |
---|
220 | </Para> |
---|
221 | |
---|
222 | <screen> |
---|
223 | [base] |
---|
224 | ; send output to printer 'oak' |
---|
225 | output_unix=|lpr -Poak |
---|
226 | </screen> |
---|
227 | |
---|
228 | <Para>Note you can also override the output setting using the --output |
---|
229 | command line option. |
---|
230 | </Para> |
---|
231 | |
---|
232 | <Para> |
---|
233 | If the output device isn't a device or a pipe command, it is taken as |
---|
234 | a filename to write the printer data to. This can then be sent to a |
---|
235 | printer later. |
---|
236 | </Para> |
---|
237 | |
---|
238 | <caution> |
---|
239 | <Para>If you're using &msdos; you need to be careful when sending output |
---|
240 | to 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 |
---|
243 | PRN 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 |
---|
245 | of &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/ |
---|
248 | or <filename/LPT1/ in the configuration file, then this problem should not |
---|
249 | occur.</Para> |
---|
250 | |
---|
251 | <Para>printps produces text files as output, and so should be unaffected by |
---|
252 | this problem.</Para> |
---|
253 | </caution> |
---|
254 | |
---|
255 | <Para> |
---|
256 | printdm can also drive Canon bubblejets in native mode (which gives a |
---|
257 | higher resolution than in Epson emulation mode). To use this, |
---|
258 | set "like=bj" in the "[dm]" section - like so: |
---|
259 | </Para> |
---|
260 | |
---|
261 | <screen> |
---|
262 | [dm] |
---|
263 | like=bj</screen> |
---|
264 | |
---|
265 | </refsect1> |
---|