2003-04-01 05:26:13 +02:00
|
|
|
<sect1 id="config-printing">
|
2000-08-08 03:24:00 +02:00
|
|
|
<title>Printing in Wine</title>
|
|
|
|
<para>How to print documents in Wine...</para>
|
|
|
|
|
2003-04-01 05:26:13 +02:00
|
|
|
<sect2 id="config-printing-intro">
|
2000-08-08 03:24:00 +02:00
|
|
|
<title>Printing</title>
|
|
|
|
|
|
|
|
<para>
|
2004-01-20 02:23:04 +01:00
|
|
|
Printing in Wine can be done using the built-in Wine PostScript driver (+ ghostscript to produce
|
|
|
|
output for non-PostScript printers).
|
2000-08-08 03:24:00 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Note that at the moment WinPrinters (cheap, dumb printers that require
|
2000-12-13 22:52:37 +01:00
|
|
|
the host computer to explicitly control the head) will not work with
|
|
|
|
their Windows printer drivers. It is unclear whether they ever will.
|
2000-08-08 03:24:00 +02:00
|
|
|
</para>
|
|
|
|
|
2001-04-02 21:14:41 +02:00
|
|
|
<sect3>
|
2003-04-01 05:26:13 +02:00
|
|
|
<title>Built-in Wine PostScript driver</title>
|
2001-07-08 22:36:48 +02:00
|
|
|
<para>
|
|
|
|
Enables printing of PostScript files via a driver built into Wine. See
|
|
|
|
below for installation instructions. The code for the PostScript
|
|
|
|
driver is in <filename>dlls/wineps/</filename>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The driver behaves as if it were a DRV file called
|
|
|
|
<filename>wineps.drv</filename> which at the moment is built into
|
|
|
|
Wine.
|
|
|
|
Although it mimics a 16 bit driver, it will work with both 16 and 32
|
|
|
|
bit apps, just as win9x drivers do.
|
|
|
|
</para>
|
|
|
|
</sect3>
|
|
|
|
|
2001-04-02 21:14:41 +02:00
|
|
|
<sect3>
|
2000-08-08 03:24:00 +02:00
|
|
|
<title>Spooling</title>
|
|
|
|
<para>
|
|
|
|
Spooling is rather primitive. The [spooler] section of
|
2002-07-24 05:00:02 +02:00
|
|
|
the wine config file maps a port (e.g.
|
2000-08-08 03:24:00 +02:00
|
|
|
<systemitem>LPT1:</systemitem>) to a file or a command via a pipe. For
|
|
|
|
example the following lines
|
|
|
|
</para>
|
|
|
|
<screen>
|
2001-07-08 22:36:48 +02:00
|
|
|
"LPT1:" = "foo.ps"
|
|
|
|
"LPT2:" = "|lpr"
|
2000-08-08 03:24:00 +02:00
|
|
|
</screen>
|
|
|
|
<para>
|
|
|
|
map <systemitem>LPT1:</systemitem> to file <filename>foo.ps</filename>
|
|
|
|
and <systemitem>LPT2:</systemitem> to the <command>lpr</command>
|
2001-07-08 22:36:48 +02:00
|
|
|
command. If a job is sent to an unlisted port, then a file is created
|
|
|
|
with that port's name; e.g. for <systemitem>LPT3:</systemitem> a file
|
2000-08-08 03:24:00 +02:00
|
|
|
called <systemitem>LPT3:</systemitem> would be created.
|
|
|
|
</para>
|
2001-05-10 05:10:58 +02:00
|
|
|
<para>
|
|
|
|
There are now also virtual spool queues called
|
|
|
|
<systemitem>LPR:printername</systemitem>, which send the data
|
2002-07-24 05:00:02 +02:00
|
|
|
to <command>lpr -Pprintername</command>. You do not need to
|
2001-05-10 05:10:58 +02:00
|
|
|
specify those in the config file, they are handled automatically by
|
|
|
|
<filename>dlls/gdi/printdrv.c</filename>.
|
2001-05-14 21:24:30 +02:00
|
|
|
</para>
|
2001-04-02 21:14:41 +02:00
|
|
|
</sect3>
|
|
|
|
</sect2>
|
2000-08-08 03:24:00 +02:00
|
|
|
|
2003-04-01 05:26:13 +02:00
|
|
|
<sect2 id="config-printing-psdriver">
|
2000-08-08 03:24:00 +02:00
|
|
|
<title>The Wine PostScript Driver</title>
|
|
|
|
|
|
|
|
<para>
|
2001-05-10 05:10:58 +02:00
|
|
|
This allows Wine to generate PostScript files without
|
|
|
|
needing an external printer driver. Wine in this case uses the
|
2001-07-08 22:36:48 +02:00
|
|
|
system provided PostScript printer filters, which almost all use
|
2001-05-10 05:10:58 +02:00
|
|
|
ghostscript if necessary. Those should be configured during the
|
|
|
|
original system installation or by your system administrator.
|
2000-08-08 03:24:00 +02:00
|
|
|
</para>
|
|
|
|
|
2001-04-02 21:14:41 +02:00
|
|
|
<sect3>
|
2000-08-08 03:24:00 +02:00
|
|
|
<title>Installation</title>
|
2001-05-10 05:10:58 +02:00
|
|
|
<sect4>
|
|
|
|
<title>Installation of CUPS printers</title>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
If you are using CUPS, you do not need to configure .ini or
|
2001-05-10 05:10:58 +02:00
|
|
|
registry entries, everything is autodetected.
|
|
|
|
</para>
|
|
|
|
</sect4>
|
|
|
|
<sect4>
|
|
|
|
<title>Installation of LPR /etc/printcap based printers</title>
|
|
|
|
<para>
|
|
|
|
If your system is not yet using CUPS, it probably uses LPRng
|
2002-07-24 05:00:02 +02:00
|
|
|
or a LPR based system with configuration based on <filename>/etc/printcap</filename>.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If it does, your printers in <filename>/etc/printcap</filename>
|
|
|
|
are scanned with a heuristic whether they are PostScript capable
|
|
|
|
printers and also configured mostly automatic.
|
|
|
|
</para>
|
|
|
|
<para>
|
2003-01-05 02:08:56 +01:00
|
|
|
Since Wine cannot find out what type of printer this is, you
|
2001-05-10 05:10:58 +02:00
|
|
|
need to specify a PPD file in the [ppd] section of
|
|
|
|
<filename>~/.wine/config</filename>. Either use the shortcut
|
2001-07-08 22:36:48 +02:00
|
|
|
name and make the entry look like:
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<screen>
|
|
|
|
[ppd]
|
|
|
|
"ps1" = "/usr/lib/wine/ps1.ppd"
|
|
|
|
</screen>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
Or you can specify a generic PPD file that is to match for all
|
|
|
|
of the remaining printers. A generic PPD file can be found in
|
|
|
|
<filename>documentation/samples/generic.ppd</filename>.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
</sect4>
|
|
|
|
<sect4>
|
|
|
|
<title>Installation of other printers</title>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
You do not need to do this if the above 2 sections apply, only if
|
2001-05-10 05:10:58 +02:00
|
|
|
you have a special printer.
|
|
|
|
</para>
|
|
|
|
<screen>
|
2001-07-08 22:36:48 +02:00
|
|
|
Wine PostScript Driver=WINEPS,LPT1:
|
2001-05-10 05:10:58 +02:00
|
|
|
</screen>
|
|
|
|
<para>
|
|
|
|
to the [devices] section and
|
|
|
|
</para>
|
|
|
|
<screen>
|
2001-07-08 22:36:48 +02:00
|
|
|
Wine PostScript Driver=WINEPS,LPT1:,15,45
|
2001-05-10 05:10:58 +02:00
|
|
|
</screen>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
to the [PrinterPorts] section of <filename>win.ini</filename>,
|
|
|
|
and to set it as the default printer also add
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<screen>
|
2001-09-11 01:17:08 +02:00
|
|
|
device = Wine PostScript Driver,WINEPS,LPT1:
|
2001-05-10 05:10:58 +02:00
|
|
|
</screen>
|
|
|
|
<para>
|
2001-09-11 01:17:08 +02:00
|
|
|
to the [windows] section of <filename>win.ini</filename>.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
You also need to add certain entries to the registry.
|
2003-07-09 21:50:14 +02:00
|
|
|
The easiest way to do this is to customize the PostScript
|
2003-04-01 05:26:13 +02:00
|
|
|
driver contents of <filename>winedefault.reg</filename> (see below) and use the
|
|
|
|
Winelib program <command>programs/regedit/regedit</command>. For
|
2001-05-10 05:10:58 +02:00
|
|
|
example, if you have installed the Wine source tree in
|
|
|
|
<filename>/usr/src/wine</filename>, you could use the following
|
|
|
|
series of commands:
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-04-01 05:26:13 +02:00
|
|
|
<userinput>cp /usr/src/wine/winedefault.reg ~</userinput>
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2003-07-22 00:42:50 +02:00
|
|
|
<para>
|
|
|
|
<userinput>vi ~/winedefault.reg</userinput>
|
|
|
|
</para>
|
2001-05-10 05:10:58 +02:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-04-01 05:26:13 +02:00
|
|
|
Edit the copy of <filename>winedefault.reg</filename> to suit your
|
|
|
|
PostScript printing requirements.
|
|
|
|
At a minimum, you must specify a PPD file for each printer.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-04-01 05:26:13 +02:00
|
|
|
<userinput>regedit ~/winedefault.reg</userinput>
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
</sect4>
|
|
|
|
<sect4>
|
2001-07-08 22:36:48 +02:00
|
|
|
<title>Required configuration for all printer types</title>
|
2001-05-10 05:10:58 +02:00
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
You won't need Adobe Font Metric (AFM) files for the (type 1 PostScript)
|
|
|
|
fonts that you wish to use any more.
|
2003-04-01 05:26:13 +02:00
|
|
|
Wine now has this information built-in.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
2001-07-08 22:36:48 +02:00
|
|
|
You'll need a PPD file for your printer. This describes
|
2001-05-10 05:10:58 +02:00
|
|
|
certain characteristics of the printer such as which fonts are
|
2001-07-08 22:36:48 +02:00
|
|
|
installed, how to select manual feed etc. Adobe has many of
|
2001-05-10 05:10:58 +02:00
|
|
|
these on its website, have a look in
|
|
|
|
<ulink url="ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/">
|
|
|
|
ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/</ulink>.
|
|
|
|
See above for information on configuring the driver to use this
|
|
|
|
file.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
To enable colour printing you need to have the
|
|
|
|
<literal>*ColorDevice</literal> entry in the PPD set to
|
|
|
|
<literal>true</literal>, otherwise the driver will generate
|
|
|
|
greyscale.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Note that you need not set <literal>printer=on</literal> in
|
2002-07-24 05:00:02 +02:00
|
|
|
the [wine] section of the wine config file, this
|
2001-05-10 05:10:58 +02:00
|
|
|
enables printing via external printer drivers and does not
|
2003-04-01 05:26:13 +02:00
|
|
|
affect the built-in PostScript driver.
|
2001-05-10 05:10:58 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If you're lucky you should now be able to produce PS files
|
|
|
|
from Wine!
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
I've tested it with win3.1 notepad/write, Winword6 and
|
|
|
|
Origin4.0 and 32 bit apps such as win98 wordpad, Winword97,
|
|
|
|
Powerpoint2000 with some degree of success - you should be
|
|
|
|
able to get something out, it may not be in the right place.
|
|
|
|
</para>
|
2001-05-14 21:24:30 +02:00
|
|
|
</sect4>
|
2001-04-02 21:14:41 +02:00
|
|
|
</sect3>
|
2000-08-08 03:24:00 +02:00
|
|
|
|
2001-04-02 21:14:41 +02:00
|
|
|
</sect2>
|
|
|
|
</sect1>
|
2000-08-08 03:24:00 +02:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
2003-04-19 04:50:57 +02:00
|
|
|
sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")
|
2000-08-08 03:24:00 +02:00
|
|
|
End:
|
|
|
|
-->
|