[cups.development] Wrong product string returned by the PPD API?

Laser, Curtis curtis.laser at hp.com
Wed Aug 12 13:50:36 PDT 2009


I have a PPD that contains two product strings. These strings specify the
same device except that one has a network port (ex. "(HP LaserJet 2000000)"
and "(HP LaserJet 2000000n)".

When I use the PPD to instantiate a queue for the non-network version ("HP
LaserJet 2000000") and execute the following code in my driver:

//NOTE: Code has been condensed to show only relevant pieces
ppd_file_t ppd = ppdOpenFile(getenv("PPD"));
fprintf(stderr, "DEBUG: Product is \"%s\".\n", ppd->product);

the log file reports that the product is "HP LaserJet 2000000n"!

If I split the ppd in two so each ppd has only one product string then I get
the correct results. Also note in both cases I am letting CUPS choose the
PPD, I am not forcing it to a certain product.

Should I get the actual product string when using the PPD that supports two
products? Or does the ppd api think that it doesn't matter which string is
returned since both are described by the same file?

BTW, I am using CUPS 1.4 on a Mac.

Thanks for any insights you can offer-

Curtis Laser





More information about the cups-devel mailing list