getenv("PPD") returning null

Michael Sweet mike at easysw.com
Mon Mar 6 06:44:14 PST 2006


Josh Mathis wrote:
> I have written my raster driver based off of rastertohp. At the
> beginning I get the PPD in use with:
> 
> ppd = ppdOpenFile(getenv("PPD"));
> 
> This has been working fine until recently. ppd used to be set to the
> full path of the ppd in use. Now, it is returning null. I have tried
> deleting ppds.dat and reloading cups, but this does not help. I know
> that CUPS is finding my ppd, because I can remove and reload my
> printer and view all the options defined in the ppd. What would cause
> getenv to not find the PPD variable? What could cause CUPS not to set
> this variable?

CUPS will always set this variable, even if the printer doesn't have
a PPD file (!).

However, if you run the filter by hand or are running it from another
script/program, it is possible the variable isn't set or passed as
expected - but that isn't a CUPS problem... :)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list