Added memicmpW.
[wine.git] / documentation / printing.sgml
blob65a9cf6fd198b4c2a83a961b3380873efdcd0885
1 <sect1 id="config-printing">
2 <title>Printing in Wine</title>
3 <para>How to print documents in Wine...</para>
5 <sect2 id="config-printing-intro">
6 <title>Printing</title>
8 <para>
9 Printing in Wine can be done using the built-in Wine PostScript driver (+ ghostscript to produce
10 output for non-PostScript printers).
11 </para>
12 <para>
13 Note that at the moment WinPrinters (cheap, dumb printers that require
14 the host computer to explicitly control the head) will not work with
15 their Windows printer drivers. It is unclear whether they ever will.
16 </para>
18 <sect3>
19 <title>Built-in Wine PostScript driver</title>
20 <para>
21 Enables printing of PostScript files via a driver built into Wine. See
22 below for installation instructions. The code for the PostScript
23 driver is in <filename>dlls/wineps/</filename>.
24 </para>
25 <para>
26 The driver behaves as if it were a DRV file called
27 <filename>wineps.drv</filename> which at the moment is built into
28 Wine.
29 Although it mimics a 16 bit driver, it will work with both 16 and 32
30 bit apps, just as win9x drivers do.
31 </para>
32 </sect3>
34 <sect3>
35 <title>Spooling</title>
36 <para>
37 Spooling is rather primitive. The [spooler] section of
38 the wine config file maps a port (e.g.
39 <systemitem>LPT1:</systemitem>) to a file or a command via a pipe. For
40 example the following lines
41 </para>
42 <screen>
43 "LPT1:" = "foo.ps"
44 "LPT2:" = "|lpr"
45 </screen>
46 <para>
47 map <systemitem>LPT1:</systemitem> to file <filename>foo.ps</filename>
48 and <systemitem>LPT2:</systemitem> to the <command>lpr</command>
49 command. If a job is sent to an unlisted port, then a file is created
50 with that port's name; e.g. for <systemitem>LPT3:</systemitem> a file
51 called <systemitem>LPT3:</systemitem> would be created.
52 </para>
53 <para>
54 There are now also virtual spool queues called
55 <systemitem>LPR:printername</systemitem>, which send the data
56 to <command>lpr -Pprintername</command>. You do not need to
57 specify those in the config file, they are handled automatically by
58 <filename>dlls/gdi/printdrv.c</filename>.
59 </para>
60 </sect3>
61 </sect2>
63 <sect2 id="config-printing-psdriver">
64 <title>The Wine PostScript Driver</title>
66 <para>
67 This allows Wine to generate PostScript files without
68 needing an external printer driver. Wine in this case uses the
69 system provided PostScript printer filters, which almost all use
70 ghostscript if necessary. Those should be configured during the
71 original system installation or by your system administrator.
72 </para>
74 <sect3>
75 <title>Installation</title>
76 <sect4>
77 <title>Installation of CUPS printers</title>
78 <para>
79 If you are using CUPS, you do not need to configure .ini or
80 registry entries, everything is autodetected.
81 </para>
82 </sect4>
83 <sect4>
84 <title>Installation of LPR /etc/printcap based printers</title>
85 <para>
86 If your system is not yet using CUPS, it probably uses LPRng
87 or a LPR based system with configuration based on <filename>/etc/printcap</filename>.
88 </para>
89 <para>
90 If it does, your printers in <filename>/etc/printcap</filename>
91 are scanned with a heuristic whether they are PostScript capable
92 printers and also configured mostly automatic.
93 </para>
94 <para>
95 Since Wine cannot find out what type of printer this is, you
96 need to specify a PPD file in the [ppd] section of
97 <filename>~/.wine/config</filename>. Either use the shortcut
98 name and make the entry look like:
99 </para>
100 <screen>
101 [ppd]
102 "ps1" = "/usr/lib/wine/ps1.ppd"
103 </screen>
104 <para>
105 Or you can specify a generic PPD file that is to match for all
106 of the remaining printers. A generic PPD file can be found in
107 <filename>documentation/samples/generic.ppd</filename>.
108 </para>
109 </sect4>
110 <sect4>
111 <title>Installation of other printers</title>
112 <para>
113 You do not need to do this if the above 2 sections apply, only if
114 you have a special printer.
115 </para>
116 <screen>
117 Wine PostScript Driver=WINEPS,LPT1:
118 </screen>
119 <para>
120 to the [devices] section and
121 </para>
122 <screen>
123 Wine PostScript Driver=WINEPS,LPT1:,15,45
124 </screen>
125 <para>
126 to the [PrinterPorts] section of <filename>win.ini</filename>,
127 and to set it as the default printer also add
128 </para>
129 <screen>
130 device = Wine PostScript Driver,WINEPS,LPT1:
131 </screen>
132 <para>
133 to the [windows] section of <filename>win.ini</filename>.
134 </para>
135 <para>
136 You also need to add certain entries to the registry.
137 The easiest way to do this is to customize the PostScript
138 driver contents of <filename>winedefault.reg</filename> (see below) and use the
139 Winelib program <command>programs/regedit/regedit</command>. For
140 example, if you have installed the Wine source tree in
141 <filename>/usr/src/wine</filename>, you could use the following
142 series of commands:
143 <itemizedlist>
144 <listitem>
145 <para>
146 <userinput>cp /usr/src/wine/winedefault.reg ~</userinput>
147 </para>
148 </listitem>
149 <listitem>
150 <para>
151 <userinput>vi ~/winedefault.reg</userinput>
152 </para>
153 </listitem>
154 <listitem>
155 <para>
156 Edit the copy of <filename>winedefault.reg</filename> to suit your
157 PostScript printing requirements.
158 At a minimum, you must specify a PPD file for each printer.
159 </para>
160 </listitem>
161 <listitem>
162 <para>
163 <userinput>regedit ~/winedefault.reg</userinput>
164 </para>
165 </listitem>
166 </itemizedlist>
167 </para>
168 </sect4>
169 <sect4>
170 <title>Required configuration for all printer types</title>
171 <para>
172 You won't need Adobe Font Metric (AFM) files for the (type 1 PostScript)
173 fonts that you wish to use any more.
174 Wine now has this information built-in.
175 </para>
176 <para>
177 You'll need a PPD file for your printer. This describes
178 certain characteristics of the printer such as which fonts are
179 installed, how to select manual feed etc. Adobe has many of
180 these on its website, have a look in
181 <ulink url="ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/">
182 ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/</ulink>.
183 See above for information on configuring the driver to use this
184 file.
185 </para>
186 <para>
187 To enable colour printing you need to have the
188 <literal>*ColorDevice</literal> entry in the PPD set to
189 <literal>true</literal>, otherwise the driver will generate
190 greyscale.
191 </para>
192 <para>
193 Note that you need not set <literal>printer=on</literal> in
194 the [wine] section of the wine config file, this
195 enables printing via external printer drivers and does not
196 affect the built-in PostScript driver.
197 </para>
198 <para>
199 If you're lucky you should now be able to produce PS files
200 from Wine!
201 </para>
202 <para>
203 I've tested it with win3.1 notepad/write, Winword6 and
204 Origin4.0 and 32 bit apps such as win98 wordpad, Winword97,
205 Powerpoint2000 with some degree of success - you should be
206 able to get something out, it may not be in the right place.
207 </para>
208 </sect4>
209 </sect3>
211 </sect2>
212 </sect1>
214 <!-- Keep this comment at the end of the file
215 Local variables:
216 mode: sgml
217 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")
218 End: