Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 1 | Wine PostScript Driver |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 2 | ====================== |
| 3 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 4 | When complete this will allow Wine to generate PostScript files without needing |
| 5 | an external printer driver. It should be possible to print to a non PostScript |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 6 | printer by filtering the output through ghostscript. |
| 7 | |
| 8 | |
| 9 | Installation |
| 10 | ------------ |
| 11 | |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 12 | The driver behaves as if it were a DRV file called WINEPS.DRV which at the |
| 13 | moment is built into Wine. Although it mimics a 16 bit driver it will work |
| 14 | with both 16 and 32 bit apps, just as win9x drivers do. |
| 15 | |
| 16 | To install it add |
| 17 | |
| 18 | Wine PostScript Driver=WINEPS,LPT1: |
| 19 | |
| 20 | to the [devices] section of win.ini and to set it as the default printer also |
| 21 | add |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 22 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 23 | device=Wine PostScript Driver,WINEPS,LPT1: |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 24 | |
Huw D M Davies | bb14056 | 1999-07-23 19:23:49 +0000 | [diff] [blame] | 25 | to the [windows] section of win.ini and |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 26 | |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 27 | |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 28 | To run 32 bit apps (and 16 bit apps using the builtin commdlg) you also need to |
| 29 | add certain entries to the registry. The easiest way to do that at the moment |
| 30 | is to use the winelib program programs/regapi/regapi with the file |
| 31 | documentation/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 |
| 34 | psdrv.reg to suit your requirements. |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 35 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 36 | You will need Adobe Font Metric (AFM) files for the (type 1 PostScript) fonts |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 37 | that you wish to use. You can get these from |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 38 | ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles . The directories base17 |
| 39 | or base35 are good places to start. Note that these are only the font metrics |
| 40 | and not the fonts themselves. At the moment the driver does not download |
| 41 | additional fonts, so you can only use fonts that are already present on the |
| 42 | printer. |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 43 | |
| 44 | Then create a [afmfiles] section in your wine.conf (or ~/.winerc) and add a |
| 45 | line of the form |
| 46 | |
| 47 | file=/unix/path/name/filename.afm |
| 48 | |
| 49 | for each AFM file that you wish to use. [This might change in the future] |
| 50 | |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 51 | You also require a PPD file for your printer. This describes certain |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 52 | characteristics of the printer such as which fonts are installed, how to select |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 53 | manual feed etc. Adobe also has many of these on its website, have a look in |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 54 | ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/ |
Thuy Nguyen | 4884396 | 1999-07-18 15:25:34 +0000 | [diff] [blame] | 55 | Create a [psdrv] section in your wine.conf (or ~/.winerc) and add the |
| 56 | following entry: |
| 57 | |
| 58 | ppdfile=/somewhere/file.ppd |
| 59 | |
| 60 | By default, the driver will look for a file named default.ppd in the directory |
| 61 | from which you started wine. |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 62 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 63 | To enable colour printing you need to have the *ColorDevice entry in the PPD |
| 64 | set to true, otherwise the driver will generate greyscale. |
| 65 | |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 66 | Note that you need not set printer=on in the [wine] section of wine.conf, this |
| 67 | enables printing via external printer drivers and does not affect wineps. |
| 68 | |
| 69 | If you're lucky you should now be able to produce PS files from Wine! |
| 70 | |
Huw D M Davies | 395d370 | 1999-11-13 20:55:31 +0000 | [diff] [blame] | 71 | I've tested it with win3.1 notepad/write, Winword6 and Origin4.0 and 32 bit |
| 72 | apps such as win98 wordpad, Winword97, Powerpoint2000 with some degree of |
| 73 | success - you should be able to get something out, it may not be in the right |
| 74 | place. |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 75 | |
| 76 | TODO / Bugs |
| 77 | ----------- |
| 78 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 79 | Driver does read PPD files, but ignores all constraints and doesn't let you |
| 80 | specify whether you have optional extras such as envelope feeders. You will |
| 81 | therefore find a larger than normal selection of input bins in the print setup |
| 82 | dialog box. I've only really tested ppd parsing on the hp4m6_v1.ppd file. |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 83 | |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 84 | No TrueType download. |
| 85 | |
Huw D M Davies | 7603dea | 1999-04-25 09:24:23 +0000 | [diff] [blame] | 86 | StretchDIBits uses level 2 PostScript. |
| 87 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 88 | AdvancedSetup dialog box. |
| 89 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 90 | Many partially implemented functions. |
| 91 | |
| 92 | ps.c is becoming messy. |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 93 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 94 | Notepad often starts text too far to the left depending on the margin |
| 95 | settings. However the win3.1 pscript.drv (under wine) also does this. |
| 96 | |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 97 | Probably many more... |
| 98 | |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 99 | Please contact me if you want to help so that we can avoid duplication. |
| 100 | |
| 101 | Huw Davies <h.davies1@physics.ox.ac.uk> |