Set printer options

shermin sherminismail at gmail.com
Sun Dec 21 03:47:33 PST 2008


Hi,

If i change the "Set printer options"from cups webpage,argv[5] should reflect right.I am checking like that.Specifying print options ,  do you meant by this?

Shermin


> shermin wrote:
> > Hi,
> >  I already did the same method .When i output the value in argv[5],the changes that i did in the "Set printer Option " is not reflecting.For eg,if in the ppd value if the default value of "Paper size is Letter " and if i changed in the set printer options to "Legal" after adding the printer ,the change is not reflecting in the argument value[argv[5]).From where we can get the changed value to use the below APIS.
>
> How are you specifying the print options?
>
> > Shermin
> >
> >
> >> shermin wrote:
> >>> Hi,
> >>>
> >>>   If i made changes to "set printer options"   after adding the printer and when i asked to print the argv[5] value is not updating.It is getting the value from .ppd file.If we made any changes in the printer options that should be updated right.How will we get those changed values .?
> >>  From the PPD file or from the page header values...
> >>
> >> If the PPD code does not set a page header value, use the following
> >> to lookup the currently set PPD option:
> >>
> >>      ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
> >>      ppd_choice_t *marked;
> >>      int num_options;
> >>      cups_option_t *options;
> >>
> >>      num_options = cupsParseOptions(argv[5], 0, &options);
> >>      ppdMarkDefaults(ppd);
> >>      cupsMarkOptions(ppd, num_options, options);
> >>
> >>      ...
> >>
> >>      // Which choice for "Foo" is selected? (Note, can return NULL!)
> >>      choice = ppdFindMarkedChoice(ppd, "Foo");
> >>      if (choice != NULL && strcmp(choice->choice, "Bar") == 0)
> >>      {
> >>        // Foo=Bar is chosen!
> >>      }
> >>
> >> (Options that use PostScript code to set page header values can be used
> >>   to do per-page settings, while PPD-only settings apply to the whole
> >>   document/job...)
> >>
> >> --
> >> ______________________________________________________________________
> >> Michael Sweet, Easy Software Products           mike at easysw dot com
> >
>
>
> --
> ______________________________________________________________________
> Michael Sweet, Easy Software Products           mike at easysw dot com





More information about the cups mailing list