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>
9 Printing in Wine can be done using the built-in Wine PostScript driver (+ ghostscript to produce
10 output for non-PostScript printers).
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.
19 <title>Built-in Wine PostScript driver
</title>
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>.
26 The driver behaves as if it were a DRV file called
27 <filename>wineps.drv
</filename> which at the moment is built into
29 Although it mimics a
16 bit driver, it will work with both
16 and
32
30 bit apps, just as win9x drivers do.
35 <title>Spooling
</title>
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
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.
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>.
63 <sect2 id=
"config-printing-psdriver">
64 <title>The Wine PostScript Driver
</title>
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.
75 <title>Installation
</title>
77 <title>Installation of CUPS printers
</title>
79 If you are using CUPS, you do not need to configure .ini or
80 registry entries, everything is autodetected.
84 <title>Installation of LPR /etc/printcap based printers
</title>
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>.
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.
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:
102 "ps1" =
"/usr/lib/wine/ps1.ppd"
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>.
111 <title>Installation of other printers
</title>
113 You do not need to do this if the above
2 sections apply, only if
114 you have a special printer.
117 Wine PostScript Driver=WINEPS,LPT1:
120 to the [devices] section and
123 Wine PostScript Driver=WINEPS,LPT1:,
15,
45
126 to the [PrinterPorts] section of
<filename>win.ini
</filename>,
127 and to set it as the default printer also add
130 device = Wine PostScript Driver,WINEPS,LPT1:
133 to the [windows] section of
<filename>win.ini
</filename>.
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
146 <userinput>cp /usr/src/wine/winedefault.reg ~
</userinput>
151 <userinput>vi ~/winedefault.reg
</userinput>
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.
163 <userinput>regedit ~/winedefault.reg
</userinput>
170 <title>Required configuration for all printer types
</title>
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.
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
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
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.
199 If you're lucky you should now be able to produce PS files
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.
214 <!-- Keep this comment at the end of the file
217 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")