[cups.development] How to get job options for shared printers on OSX

Michael Sweet msweet at apple.com
Wed May 11 08:38:47 PDT 2011


On May 10, 2011, at 12:57 AM, keens312 wrote:
> Hi Michael,
> 
> When print to a Mac OSX (10.6) shared printer, we got option like job-uuid=urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx.
> 
> How can we use this uuid to get the real options we want?


The UUID is informational; all of the options will still be where you expect them, in argv[5]. For any PPD options the correct process is to do:

	int num_options;
	cups_option_t *options;
	ppd_file_t *ppd;

	num_options = cupsParseOptions(argv[5], 0, &options);
	ppd = ppdOpenFile(getenv("PPD"));
	ppdMarkDefaults(ppd);
	cupsMarkOptions(ppd, num_options, options);

and then use ppdFindMarkedChoice for any option you care about.

For CUPS raster drivers you also need to look at the page header - those values may override the defaults set from the command-line.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list