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 contains 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> |
---|
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 | indicates that the following character or characters are to be |
---|
93 | interpreted as a control code, as follows: |
---|
94 | \ followed by an 'x' followed by two hex digits |
---|
95 | represents the character with that hex value; |
---|
96 | a 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> |
---|
103 | This is all rather cryptic (printer codes inherently are) but the provided |
---|
104 | set-ups will work with nearly all dot matrix printers, so you are unlikely |
---|
105 | to 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: |
---|
113 | hpgl_generic_a4landscape, |
---|
114 | hpgl_generic_a1landscape, and |
---|
115 | hpgl_generic_a0landscape. |
---|
116 | </Para> |
---|
117 | |
---|
118 | </refsect3> |
---|
119 | |
---|
120 | <refsect3><title>printpcl</title> |
---|
121 | |
---|
122 | <Para>The definitions provided for printpcl are: |
---|
123 | pcl_generic_a4 and pcl_modern_a4.</Para> |
---|
124 | |
---|
125 | <Para>Note that if you are using a PCL printer the defaults are set |
---|
126 | not to use advanced printer features for compatibility. If you want to |
---|
127 | try these (equivalent to HP Laserjet III or later), then you should |
---|
128 | use the modern_pcl_a4 printer definition (see below for how to do this). |
---|
129 | This 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: |
---|
136 | ps_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 |
---|
141 | best 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 |
---|
143 | section to your printer. Then add new options to override the ones that are |
---|
144 | not correct for your printer. Finally you need to change the section for the |
---|
145 | type of printer you are using to point to your new definition. E.g. if you |
---|
146 | are using a dot-matrix printer then you need to change the [DM] section to |
---|
147 | say like=my_printer . |
---|
148 | </Para> |
---|
149 | --> |
---|
150 | |
---|
151 | </refsect2> |
---|
152 | </refsect1> |
---|
153 | |
---|
154 | <refsect1><Title>Customising Printer Settings</Title> |
---|
155 | |
---|
156 | <Para> |
---|
157 | The only settings most users will want to customise are which printer |
---|
158 | definition is used, and where to send the output. If you're using a Dot |
---|
159 | Matrix 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 |
---|
163 | on Unix, or in the same directory as the Survex program files on other |
---|
164 | systems), 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> |
---|
174 | The drivers look for the section "[dm]", "[ps]", "[pcl]" or "[hpgl]" as |
---|
175 | appropriate. The file you create should should contain something like |
---|
176 | this to select a particular printer: |
---|
177 | </Para> |
---|
178 | |
---|
179 | <screen> |
---|
180 | [pcl] |
---|
181 | like=pcl_modern_a4 |
---|
182 | </screen> |
---|
183 | |
---|
184 | <Para> |
---|
185 | For printdm, it should also contain calibration measurements (calibrate |
---|
186 | your printer by running <command>printdm --calibrate</command>): |
---|
187 | </Para> |
---|
188 | |
---|
189 | <screen> |
---|
190 | [dm] |
---|
191 | like=dm_24pin_a4 |
---|
192 | mm_across_page=202 |
---|
193 | mm_down_page=278 |
---|
194 | </screen> |
---|
195 | |
---|
196 | <Para> |
---|
197 | You can override other settings too, such as the output destination. |
---|
198 | This 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 |
---|
200 | specific section (such as [dm]). |
---|
201 | The output destination is set by an option of the form |
---|
202 | output_<platform>=<device>, where device can be a device name |
---|
203 | (e.g. PRN, LPT1, LPT2 under &msdos;, <filename/Printer:/ under &riscos;) or a |
---|
204 | filename: |
---|
205 | </Para> |
---|
206 | |
---|
207 | <screen> |
---|
208 | [dm] |
---|
209 | output_msdos=LPT1 |
---|
210 | like=dm_24pin_a4 |
---|
211 | mm_across_page=202 |
---|
212 | mm_down_page=278 |
---|
213 | </screen> |
---|
214 | |
---|
215 | <Para><!--FIXME what else has popen? msdos too?--> |
---|
216 | Under &unix; output may be piped into another command like so: |
---|
217 | </Para> |
---|
218 | |
---|
219 | <screen> |
---|
220 | [base] |
---|
221 | ; send output to printer 'oak' |
---|
222 | output_unix=|lpr -Poak |
---|
223 | </screen> |
---|
224 | |
---|
225 | <Para>Note you can also override the output setting using the --output |
---|
226 | command line option. |
---|
227 | </Para> |
---|
228 | |
---|
229 | <Para> |
---|
230 | If the output device isn't a device or a pipe command, it is taken as |
---|
231 | a filename to write the printer data to. This can then be sent to a |
---|
232 | printer later. |
---|
233 | </Para> |
---|
234 | |
---|
235 | <caution> |
---|
236 | <Para>If you're using &msdos; you need to be careful when sending output |
---|
237 | to 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 |
---|
240 | PRN 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 |
---|
242 | of &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/ |
---|
245 | or <filename/LPT1/ in the configuration file, then this problem should not |
---|
246 | occur.</Para> |
---|
247 | |
---|
248 | <Para>printps produces text files as output, and so should be unaffected by |
---|
249 | this problem.</Para> |
---|
250 | </caution> |
---|
251 | |
---|
252 | <Para> |
---|
253 | printdm can also drive Canon bubblejets in native mode (which gives a |
---|
254 | higher resolution than in Epson emulation mode). To use this, |
---|
255 | set "like=bj" in the "[dm]" section - like so: |
---|
256 | </Para> |
---|
257 | |
---|
258 | <screen> |
---|
259 | [dm] |
---|
260 | like=bj</screen> |
---|
261 | |
---|
262 | </refsect1> |
---|