Commit 48843965 authored by Thuy Nguyen's avatar Thuy Nguyen Committed by Alexandre Julliard

Introduced a [psdrv] section in wine.conf with a ppdfile value

specifying the path and name of the PPD file.
parent 59fb1303
...@@ -43,8 +43,13 @@ You also require a PPD file for your printer. This describes certain ...@@ -43,8 +43,13 @@ 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 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 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/ ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/
Put the PPD in the directory from which you start wine and call it default.ppd Create a [psdrv] section in your wine.conf (or ~/.winerc) and add the
[this will definitely change soon]. following entry:
ppdfile=/somewhere/file.ppd
By default, the driver will look for a file named default.ppd in the directory
from which you started wine.
To enable colour printing you need to have the *ColorDevice entry in the PPD To enable colour printing you need to have the *ColorDevice entry in the PPD
set to true, otherwise the driver will generate greyscale. set to true, otherwise the driver will generate greyscale.
......
...@@ -362,6 +362,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name) ...@@ -362,6 +362,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
(LPBYTE)pi->Devmode, needed, &needed); (LPBYTE)pi->Devmode, needed, &needed);
} }
PROFILE_GetWineIniString("psdrv", "ppdfile", "default.ppd",
pi->Devmode->dmDrvPrivate.ppdFileName, 256);
pi->ppd = PSDRV_ParsePPD(pi->Devmode->dmDrvPrivate.ppdFileName); pi->ppd = PSDRV_ParsePPD(pi->Devmode->dmDrvPrivate.ppdFileName);
if(!pi->ppd) { if(!pi->ppd) {
HeapFree(PSDRV_Heap, 0, pi->FriendlyName); HeapFree(PSDRV_Heap, 0, pi->FriendlyName);
......
...@@ -148,7 +148,7 @@ typedef struct { ...@@ -148,7 +148,7 @@ typedef struct {
int dummy; int dummy;
} dmDocPrivate; } dmDocPrivate;
struct _tagdrvprivate { struct _tagdrvprivate {
char ppdFileName[100]; /* Hack */ char ppdFileName[256]; /* Hack */
UINT numInstalledOptions; /* Options at end of struct */ UINT numInstalledOptions; /* Options at end of struct */
} dmDrvPrivate; } dmDrvPrivate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment