Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing digest, Vol 1 #244 - 2 msgs: getting the value of installable options in a PDE (Hans Loonen)



Hi,

Here is just a reminder that I did not get a reaction to my problem yet.
I spent another half a day to figure out how to obtain information about
what installable options a user has set in a PDE but I don't get any
further.
E.g. I looked in the Core technologies documentation "getting a ticket
reference" and I used the PMSessionGetDataFromSession function as described:

void describe255(CFTypeRef tested)
{
char buffer[256];
SInt32 got;
CFStringRef description = CFCopyDescription(tested);
CFStringGetBytes(description, CFRangeMake(0,
CFStringGetLength(description)),
CFStringGetSystemEncoding(), '?', TRUE, buffer, 255, &got);
buffer[got]=(char)0;
VERBOSE("describe255: %s", buffer);
CFRelease(description);
}

OSStatus SyncPaneFromTicket(PMPDEContext context, PMPrintSession
printSession)
{
CFTypeRef mydata;
PMSessionGetDataFromSession(printSession, kPDE_PMPrintSettingsRef ,
&mydata);
describe255(mydata);

The result from the debugger is:
VERBOSE: [06/10/2003 16:21:05] describe255: <CFNumber 0x16be050
[0xa01303fc]>{value = +24602144, type = kCFNumberSInt32Type}

What does this mean???

Who has any experience with this and can help me?

Hans

----- Original Message -----
From: <email@hidden>
To: <email@hidden>
Sent: Saturday, October 04, 2003 07:01
Subject: printing digest, Vol 1 #244 - 2 msgs


> Message: 1
> From: "Hans Loonen" <email@hidden>
> To: <email@hidden>
> Subject: getting the value of installable options in a PDE
> Date: Fri, 3 Oct 2003 13:10:20 +0200
>
> Hi,
>
> I'm working on a PDE customized Mac printer driver and in a PDE I want to
> read the values of the installable options. I used some code Joris Kempen
> got from Paul Danbold but that still does provide me the correct answer.
>
> Here is what I did:
>
> In the PPD file I defined the installable option OCMailBoxOption as
follows:
>
> *OpenGroup: InstallableOptions/Options Installed
>
> *OpenUI *OCMailBoxOption/Mailbox : PickOne
> *DefaultOCMailBoxOption: False
> *OCMailBoxOption True/Use mailbox: ""
> *OCMailBoxOption False/Don't use mailbox: ""
> *CloseUI: *OCMailBoxOption
>
> *CloseUI: *OCPageProgrammerOption
>
> When I build and run the driver I can select it in Print Center and change
> the value using the Show Info pane.
> So far so good.
> When I actually print I find some PS code in the output that correctly
shows
> the value:
> %%BeginFeature: *OCMailBoxOption False
>
> Of course I could parse the printjob to get the value, but that won't
solve
> the problem that I need the value also in the PDE!
>
>
> What am I doing wrong?
>
> Shouldn't I use the ticket services mechanism? in the ticket services info
I
> find:
> #define kPMInstallableOptionStr kPMPrinterInfoPrelude
"PMInstallableOption"
> #define kPMInstallableOptionKey CFSTR(kPMInstallableOptionStr)
> But how do I use them?
>
> Hans Loonen
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.