blob: 7d0e66fd43395f64827bf16451585f04ef1fb1ac [file] [log] [blame]
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001Wine PostScript Driver
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00002======================
3
Alexandre Julliarda0d77311998-09-13 16:32:00 +00004When complete this will allow Wine to generate PostScript files without needing
5an external printer driver. It should be possible to print to a non PostScript
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +00006printer by filtering the output through ghostscript.
7
8
9Installation
10------------
11
Huw D M Davies395d3701999-11-13 20:55:31 +000012The driver behaves as if it were a DRV file called WINEPS.DRV which at the
13moment is built into Wine. Although it mimics a 16 bit driver it will work
14with both 16 and 32 bit apps, just as win9x drivers do.
15
16To install it add
17
18Wine PostScript Driver=WINEPS,LPT1:
19
20to the [devices] section of win.ini and to set it as the default printer also
21add
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000022
Alexandre Julliarda0d77311998-09-13 16:32:00 +000023device=Wine PostScript Driver,WINEPS,LPT1:
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000024
Huw D M Daviesbb140561999-07-23 19:23:49 +000025to the [windows] section of win.ini and
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000026
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000027
Huw D M Davies395d3701999-11-13 20:55:31 +000028To run 32 bit apps (and 16 bit apps using the builtin commdlg) you also need to
29add certain entries to the registry. The easiest way to do that at the moment
30is to use the winelib program programs/regapi/regapi with the file
31documentation/psdrv.reg . To do this cd to programs/regapi/regapi and type
32`make' to actually make the program, then type
33`./regapi setValue <../../documentation/psdrv.reg' . You can obviously edit
34psdrv.reg to suit your requirements.
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000035
Alexandre Julliarda0d77311998-09-13 16:32:00 +000036You will need Adobe Font Metric (AFM) files for the (type 1 PostScript) fonts
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000037that you wish to use. You can get these from
Huw D M Davies395d3701999-11-13 20:55:31 +000038ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles . The directories base17
39or base35 are good places to start. Note that these are only the font metrics
40and not the fonts themselves. At the moment the driver does not download
41additional fonts, so you can only use fonts that are already present on the
42printer.
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000043
44Then create a [afmfiles] section in your wine.conf (or ~/.winerc) and add a
45line of the form
46
47file=/unix/path/name/filename.afm
48
49for each AFM file that you wish to use. [This might change in the future]
50
Huw D M Davies395d3701999-11-13 20:55:31 +000051You also require a PPD file for your printer. This describes certain
Alexandre Julliard767e6f61998-08-09 12:47:43 +000052characteristics of the printer such as which fonts are installed, how to select
Huw D M Davies395d3701999-11-13 20:55:31 +000053manual feed etc. Adobe also has many of these on its website, have a look in
Alexandre Julliard767e6f61998-08-09 12:47:43 +000054ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/
Thuy Nguyen48843961999-07-18 15:25:34 +000055Create a [psdrv] section in your wine.conf (or ~/.winerc) and add the
56following entry:
57
58ppdfile=/somewhere/file.ppd
59
60By default, the driver will look for a file named default.ppd in the directory
61from which you started wine.
Alexandre Julliard767e6f61998-08-09 12:47:43 +000062
Alexandre Julliarda0d77311998-09-13 16:32:00 +000063To enable colour printing you need to have the *ColorDevice entry in the PPD
64set to true, otherwise the driver will generate greyscale.
65
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000066Note that you need not set printer=on in the [wine] section of wine.conf, this
67enables printing via external printer drivers and does not affect wineps.
68
69If you're lucky you should now be able to produce PS files from Wine!
70
Huw D M Davies395d3701999-11-13 20:55:31 +000071I've tested it with win3.1 notepad/write, Winword6 and Origin4.0 and 32 bit
72apps such as win98 wordpad, Winword97, Powerpoint2000 with some degree of
73success - you should be able to get something out, it may not be in the right
74place.
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000075
76TODO / Bugs
77-----------
78
Alexandre Julliard767e6f61998-08-09 12:47:43 +000079Driver does read PPD files, but ignores all constraints and doesn't let you
80specify whether you have optional extras such as envelope feeders. You will
81therefore find a larger than normal selection of input bins in the print setup
82dialog box. I've only really tested ppd parsing on the hp4m6_v1.ppd file.
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000083
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000084No TrueType download.
85
Huw D M Davies7603dea1999-04-25 09:24:23 +000086StretchDIBits uses level 2 PostScript.
87
Alexandre Julliarda0d77311998-09-13 16:32:00 +000088AdvancedSetup dialog box.
89
Alexandre Julliard767e6f61998-08-09 12:47:43 +000090Many partially implemented functions.
91
92ps.c is becoming messy.
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000093
Alexandre Julliarda0d77311998-09-13 16:32:00 +000094Notepad often starts text too far to the left depending on the margin
95settings. However the win3.1 pscript.drv (under wine) also does this.
96
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000097Probably many more...
98
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000099Please contact me if you want to help so that we can avoid duplication.
100
101Huw Davies <h.davies1@physics.ox.ac.uk>