Fix the case of product and company names.
[wine] / documentation / printing.sgml
1   <sect1 id="config-printing">
2     <title>Printing in Wine</title>
3     <para>How to print documents in Wine...</para>
4
5     <sect2 id="config-printing-intro">
6       <title>Printing</title>
7
8       <para>
9         Written by &name-huw-davies; <email>&email-huw-davies;</email>
10       </para>
11       <para>
12         (Extracted from <filename>wine/documentation/printing</filename>)
13       </para>
14
15       <para>
16         Printing in Wine can be done in one of two ways:
17       </para>
18       <orderedlist>
19         <listitem>
20           <para>
21             Use the built-in Wine PostScript driver (+ ghostscript to produce
22             output for non-PostScript printers).
23           </para>
24         </listitem>
25         <listitem>
26           <para>
27             Use an external windows 3.1 printer driver (outdated, probably won't get supported any more).
28           </para>
29         </listitem>
30       </orderedlist>
31
32       <para>
33         Note that at the moment WinPrinters (cheap, dumb printers that require
34         the host computer to explicitly control the head) will not work with
35         their Windows printer drivers.  It is unclear whether they ever will.
36       </para>
37
38       <sect3>
39         <title>Built-in Wine PostScript driver</title>
40         <para>
41           Enables printing of PostScript files via a driver built into Wine. See
42           below for installation instructions. The code for the PostScript
43           driver is in <filename>dlls/wineps/</filename>.
44         </para>
45         <para>
46           The driver behaves as if it were a DRV file called
47           <filename>wineps.drv</filename> which at the moment is built into
48           Wine.
49           Although it mimics a 16 bit driver, it will work with both 16 and 32
50           bit apps, just as win9x drivers do.
51         </para>
52       </sect3>
53
54 <!--
55       <sect3>
56         <title>External printer drivers (non-working as of Jul 8, 01)</title>
57         <para>
58           At present only 16 bit drivers will work (note that these include
59           win9x drivers).  To use them, add
60         </para>
61         <screen>
62 printer=on
63         </screen>
64         <para>
65           to the [wine] section of the wine config file. This lets
66           <function>CreateDC</function> proceed if its driver argument is a 16
67           bit driver. You will probably also need to add
68         </para>
69         <screen>
70 "TTEnable" = "0" "TTOnly" = "0"
71         </screen>
72         <para>
73           to the [TrueType] section of <filename>~/.wine/config</filename>. The code for
74           the driver interface is in <filename>graphics/win16drv</filename>.
75         </para>
76       </sect3>
77 -->
78
79       <sect3>
80         <title>Spooling</title>
81         <para>
82           Spooling is rather primitive. The [spooler] section of
83           the wine config file maps a port (e.g.
84           <systemitem>LPT1:</systemitem>) to a file or a command via a pipe. For
85           example the following lines
86         </para>
87         <screen>
88 "LPT1:" = "foo.ps"
89 "LPT2:" = "|lpr"
90         </screen>
91         <para>
92           map <systemitem>LPT1:</systemitem> to file <filename>foo.ps</filename>
93           and <systemitem>LPT2:</systemitem> to the <command>lpr</command>
94           command. If a job is sent to an unlisted port, then a file is created
95           with that port's name; e.g. for <systemitem>LPT3:</systemitem> a file
96           called <systemitem>LPT3:</systemitem> would be created.
97         </para>
98         <para>
99           There are now also virtual spool queues called
100           <systemitem>LPR:printername</systemitem>, which send the data
101           to <command>lpr -Pprintername</command>. You do not need to
102           specify those in the config file, they are handled automatically by
103           <filename>dlls/gdi/printdrv.c</filename>.
104         </para>
105       </sect3>
106     </sect2>
107
108     <sect2 id="config-printing-psdriver">
109       <title>The Wine PostScript Driver</title>
110
111       <para>
112         Written by &name-huw-davies; <email>&email-huw-davies;</email>
113       </para>
114       <para>
115         (Extracted from <filename>wine/documentation/psdriver</filename>)
116       </para>
117
118       <para>
119         This allows Wine to generate PostScript files without
120         needing an external printer driver. Wine in this case uses the
121         system provided PostScript printer filters, which almost all use
122         ghostscript if necessary. Those should be configured during the
123         original system installation or by your system administrator.
124       </para>
125
126       <sect3>
127         <title>Installation</title>
128         <sect4>
129           <title>Installation of CUPS printers</title>
130           <para>
131             If you are using CUPS, you do not need to configure .ini or
132             registry entries, everything is autodetected.
133           </para>
134         </sect4>
135         <sect4>
136           <title>Installation of LPR /etc/printcap based printers</title>
137           <para>
138             If your system is not yet using CUPS, it probably uses LPRng
139             or a LPR based system with configuration based on <filename>/etc/printcap</filename>.
140           </para>
141           <para>
142             If it does, your printers in <filename>/etc/printcap</filename>
143             are scanned with a heuristic whether they are PostScript capable
144             printers and also configured mostly automatic.
145           </para>
146           <para>
147             Since Wine cannot find out what type of printer this is, you
148             need to specify a PPD file in the [ppd] section of
149             <filename>~/.wine/config</filename>. Either use the shortcut
150             name and make the entry look like:
151           </para>
152           <screen>
153             [ppd]
154             "ps1" = "/usr/lib/wine/ps1.ppd"
155           </screen>
156           <para>
157             Or you can specify a generic PPD file that is to match for all
158             of the remaining printers. A generic PPD file can be found in
159             <filename>documentation/samples/generic.ppd</filename>.
160           </para>
161         </sect4>
162         <sect4>
163           <title>Installation of other printers</title>
164           <para>
165             You do not need to do this if the above 2 sections apply, only if
166             you have a special printer.
167           </para>
168           <screen>
169   Wine PostScript Driver=WINEPS,LPT1:
170           </screen>
171           <para>
172             to the [devices] section and
173           </para>
174           <screen>
175   Wine PostScript Driver=WINEPS,LPT1:,15,45
176           </screen>
177           <para>
178             to the [PrinterPorts] section of <filename>win.ini</filename>,
179             and to set it as the default printer also add
180           </para>
181           <screen>
182   device = Wine PostScript Driver,WINEPS,LPT1:
183           </screen>
184           <para>
185             to the [windows] section of <filename>win.ini</filename>.
186           </para>
187           <para>
188             You also need to add certain entries to the registry.
189             The easiest way to do this is to customize the PostScript
190             driver contents of <filename>winedefault.reg</filename> (see below) and use the
191             Winelib program <command>programs/regedit/regedit</command>.  For
192             example, if you have installed the Wine source tree in
193             <filename>/usr/src/wine</filename>, you could use the following
194             series of commands:
195             <itemizedlist>
196               <listitem>
197                 <para>
198                   <userinput>cp /usr/src/wine/winedefault.reg ~</userinput>
199                 </para>
200               </listitem>
201               <listitem>
202                 <para>
203                   <userinput>vi ~/winedefault.reg</userinput>
204                 </para>
205               </listitem>
206               <listitem>
207                 <para>
208                   Edit the copy of <filename>winedefault.reg</filename> to suit your
209                   PostScript printing requirements.
210                   At a minimum, you must specify a PPD file for each printer.
211                 </para>
212               </listitem>
213               <listitem>
214                 <para>
215                   <userinput>regedit ~/winedefault.reg</userinput>
216                 </para>
217               </listitem>
218             </itemizedlist>
219           </para>
220         </sect4>
221         <sect4>
222           <title>Required configuration for all printer types</title>
223           <para>
224             You won't need Adobe Font Metric (AFM) files for the (type 1 PostScript)
225             fonts that you wish to use any more.
226             Wine now has this information built-in.
227           </para>
228           <para>
229             You'll need a PPD file for your printer.  This describes
230             certain characteristics of the printer such as which fonts are
231             installed, how to select manual feed etc. Adobe has many of
232             these on its website, have a look in
233             <ulink url="ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/">
234             ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/</ulink>.
235             See above for information on configuring the driver to use this
236             file.
237           </para>
238           <para>
239             To enable colour printing you need to have the
240             <literal>*ColorDevice</literal> entry in the PPD set to
241             <literal>true</literal>, otherwise the driver will generate
242             greyscale.
243           </para>
244           <para>
245             Note that you need not set <literal>printer=on</literal> in
246             the [wine] section of the wine config file, this
247             enables printing via external printer drivers and does not
248             affect the built-in PostScript driver.
249           </para>
250           <para>
251             If you're lucky you should now be able to produce PS files
252             from Wine!
253           </para>
254           <para>
255             I've tested it with win3.1 notepad/write, Winword6 and
256             Origin4.0 and 32 bit apps such as win98 wordpad, Winword97,
257             Powerpoint2000 with some degree of success - you should be
258             able to get something out, it may not be in the right place.
259           </para>
260         </sect4>
261       </sect3>
262
263       <sect3>
264         <title>TODO / Bugs</title>
265
266         <itemizedlist>
267           <listitem>
268             <para>
269               Driver does read PPD files, but ignores all constraints
270               and doesn't let you specify whether you have optional
271               extras such as envelope feeders. You will therefore find
272               a larger than normal selection of input bins in the
273               print setup dialog box. I've only really tested ppd
274               parsing on the <filename>hp4m6_v1.ppd</filename> file.
275             </para>
276           </listitem>
277           <listitem>
278             <para>
279               No TrueType download.
280             </para>
281           </listitem>
282           <listitem>
283             <para>
284               StretchDIBits uses level 2 PostScript.
285             </para>
286           </listitem>
287           <listitem>
288             <para>
289               AdvancedSetup dialog box.
290             </para>
291           </listitem>
292           <listitem>
293             <para>
294               Many partially implemented functions.
295             </para>
296           </listitem>
297           <listitem>
298             <para>
299               ps.c is becoming messy.
300             </para>
301           </listitem>
302           <listitem>
303             <para>
304               Notepad often starts text too far to the left depending
305               on the margin settings. However the win3.1
306               <filename>pscript.drv</filename> (under wine) also does
307               this.
308             </para>
309           </listitem>
310           <listitem>
311             <para>
312               Probably many more...
313             </para>
314           </listitem>
315         </itemizedlist>
316
317         <para>
318           Please contact me if you want to help so that we can avoid duplication.
319         </para>
320         <para>
321           &name-huw-davies; <email>&email-huw-davies;</email>
322         </para>
323       </sect3>
324     </sect2>
325   </sect1>
326
327 <!-- Keep this comment at the end of the file
328 Local variables:
329 mode: sgml
330 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")
331 End:
332 -->