From 621be200c0ce96306cb404b480a4502a6a09eb04 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 10 May 2001 03:10:58 +0000 Subject: [PATCH] Changed the printing documentation to include CUPS and LPR support, also give some hints on AFM files in system and generic.ppd. --- documentation/printing.sgml | 315 +++++++++++++++++++++--------------- 1 file changed, 189 insertions(+), 126 deletions(-) diff --git a/documentation/printing.sgml b/documentation/printing.sgml index bbb39dda521..8f7edb4e16f 100644 --- a/documentation/printing.sgml +++ b/documentation/printing.sgml @@ -13,7 +13,7 @@ - Printing in Wine can be done in one of two ways. Both of which are pretty alpha. + Printing in Wine can be done in one of two ways: @@ -36,8 +36,8 @@ External printer drivers - At present only 16 bit drivers will work (note that these include win9x - drivers). To use them, add + At present only 16 bit drivers will work (note that these include + win9x drivers). To use them, add printer=on @@ -62,8 +62,15 @@ printer=on Enables printing of PostScript files via a driver built into Wine. See below for installation instructions. The code for the PostScript - driver is in graphics/psdrv. + driver is in dlls/wineps/. + + The driver behaves as if it were a DRV file called + wineps.drv 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. + @@ -84,6 +91,12 @@ printer=on with that port's name e.g. for LPT3: a file called LPT3: would be created. + + There are now also virtual spool queues called + LPR:printername, which send the data + to lpr -Pprintername. You do not need to + specify those in the config file, they are handled automatically by + dlls/gdi/printdrv.c. @@ -98,132 +111,182 @@ printer=on - When complete this will allow Wine to generate PostScript files without - needing an external printer driver. It should be possible to print to a - non PostScript printer by filtering the output through ghostscript. + This allows Wine to generate PostScript files without + needing an external printer driver. Wine in this case uses the + system provided postscript printer filters, which almost all use + ghostscript if necessary. Those should be configured during the + original system installation or by your system administrator. Installation - - The driver behaves as if it were a DRV file called - wineps.drv 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. - - - To install it add - - -"Wine PostScript Driver" = "WINEPS,LPT1:" - - - to the [devices] section and - - -"Wine PostScript Driver" = "WINEPS,LPT1:,15,45" - - - to the [PrinterPorts] section of win.ini and to set it - as the default printer also add - - -"device" = "Wine PostScript Driver,WINEPS,LPT1:" - - - to the [windows] section of ~/.wine/config and ??? - [sic] - - - You also need to add certain entries to the registry. The easiest way - to do this is to customise the contents of - documentation/psdrv.reg (see below) and use the - Winelib program programs/regapi/regapi. For - example, if you have installed the Wine source tree in - /usr/src/wine, you could use the following - series of commands: - - - - cp /usr/src/wine/documentation/psdrv.reg ~ - - - - vi ~/psdrv.reg - - - - Edit the copy of psdrv.reg to suit your - requirements. At a minimum, you must specify a PPD file for - each printer. - - - - - regapi setValue < ~/psdrv.reg - - - - - - You will need Adobe Font Metric (AFM) files for the (type 1 PostScript) - fonts that you wish to use. You can get these from - - ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles . The - directories base17 or base35 - are good places to start. Note that these are only the font metrics and - not the fonts themselves. At the moment the driver does not download - additional fonts, so you can only use fonts that are already present on - the printer. (Actually, the driver can use any font that is listed in - the PPD file, for which it has an AFM file. If you use fonts that are - not installed in your printer, or in - Ghostscript, you will need to use some means of embedding the font in - the print job or downloading the font to the printer. Note also that - the driver does not yet properly list required fonts in its DSC - comments, so a print manager that depends on these comments to - download the proper fonts to the printer may not work properly.) - - - Then create a [afmdirs] section in your - wine.conf (or - ~/.wine/config) and add a line of the form - - -"dir<n>" = "/unix/path/name/" - - - for each directory that contains AFM files you wish to use. - - - You also require a PPD file for your printer. This describes certain - characteristics of the printer such as which fonts are installed, how - to select manual feed etc. Adobe also has many of these on its website, - have a look in - ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/. See - above for information on configuring the driver to use this file. - - - To enable colour printing you need to have the - *ColorDevice entry in the PPD set to - true, otherwise the driver will generate - greyscale. - - - Note that you need not set printer=on in - the [wine] section of wine.conf, this - enables printing via external printer drivers and does not - affect the builtin PostScript driver. - - - If you're lucky you should now be able to produce PS files - from Wine! - - - 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. - + + Installation of CUPS printers + + If you are using CUPS you do not need to configure .ini or + registry entries, everything is autodetected. + + + + Installation of LPR /etc/printcap based printers + + If your system is not yet using CUPS, it probably uses LPRng + or a LPR based system with configuration based on /etc/printcap. + + + If it does, your printers in /etc/printcap + are scanned with a heuristic whether they are PostScript capable + printers and also configured mostly automatic. + + + Since WINE cannot find out what type of printer this is, you + need to specify a PPD file in the [ppd] section of + ~/.wine/config. Either use the shortcut + name and make the entry look: + + + [ppd] + "ps1" = "/usr/lib/wine/ps1.ppd" + + + Or you can specify a generic PPD file matching for all of the rest + printers. A generic PPD file can be found in + documenation/samples/generic.ppd. + + + + Installation of other printers + + You do not need to this, if the above 2 sections apply, only if + you have a special printer. + + + "Wine PostScript Driver" = "WINEPS,LPT1:" + + + to the [devices] section and + + + "Wine PostScript Driver" = "WINEPS,LPT1:,15,45" + + + to the [PrinterPorts] section of win.ini and to set it + as the default printer also add + + + "device" = "Wine PostScript Driver,WINEPS,LPT1:" + + + to the [windows] section of ~/.wine/config and ??? + [sic] + + + You also need to add certain entries to the registry. The easiest way + to do this is to customise the contents of + documentation/psdrv.reg (see below) and use the + Winelib program programs/regapi/regapi. For + example, if you have installed the Wine source tree in + /usr/src/wine, you could use the following + series of commands: + + + + cp /usr/src/wine/documentation/psdrv.reg ~ + + + + vi ~/psdrv.reg + + + + Edit the copy of psdrv.reg to suit your + requirements. At a minimum, you must specify a PPD file for + each printer. + + + + + regapi setValue < ~/psdrv.reg + + + + + + + Required Configuration for all printertypes + + You will need Adobe Font Metric (AFM) files for the (type 1 PostScript) + fonts that you wish to use. You can get these from + + ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles . The + directories base17 or base35 + are good places to start. Note that these are only the font metrics and + not the fonts themselves. At the moment the driver does not download + additional fonts, so you can only use fonts that are already present on + the printer. (Actually, the driver can use any font that is listed in + the PPD file, for which it has an AFM file. If you use fonts that are + not installed in your printer, or in + Ghostscript, you will need to use some means of embedding the font in + the print job or downloading the font to the printer. Note also that + the driver does not yet properly list required fonts in its DSC + comments, so a print manager that depends on these comments to + download the proper fonts to the printer may not work properly.) + + + Then create a [afmdirs] section in your + wine.conf (or + ~/.wine/config) and add a line of the form + + + "dir<n>" = "/unix/path/name/" + + + for each directory that contains AFM files you wish to use. + + + There usually are a lot of afm files already on your system, + within ghostscript, enscript, a2ps or similar programs. You might + check (and probably add) the following entries to the [afmdirs] + section. + + + "1" = "/usr/share/ghostscript/fonts" + "2" = "/usr/share/a2ps/afm" + "3" = "/usr/share/enscript" + "4" = "/usr/X11R6/lib/X11/fonts/Type1" + + + You also require a PPD file for your printer. This describes + certain characteristics of the printer such as which fonts are + installed, how to select manual feed etc. Adobe also has many of + these on its website, have a look in + + ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/. + See above for information on configuring the driver to use this + file. + + + To enable colour printing you need to have the + *ColorDevice entry in the PPD set to + true, otherwise the driver will generate + greyscale. + + + Note that you need not set printer=on in + the [wine] section of wine.conf, this + enables printing via external printer drivers and does not + affect the builtin PostScript driver. + + + If you're lucky you should now be able to produce PS files + from Wine! + + + 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. +