| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 27-02-2003 11:20, "Jiang Hua" <email@hidden> wrote:_______________________________________________
Dear all:
I develop a PDE. Now we want to check if the PPD support our function or not
so that we can load/unload our PDE.
Maybe we can check the *Manufacturer option. How to check this key. Maybe we
want to add a key in PPD file.
for example: *Function1: "Supported". How to check this key?
Look in the OutPutBin example, in the Initialize functionis you can find the
exact code to check if a PPD keyword is in the PPD file of the current Job.
A snippet from my code:
err = ppdOpenCompiledPPDFromTicket(printerInfo, &ppdContext,
&tempFSSpec);
if(err == noErr)
{
mIndex = ppdGetMainIndex(ppdContext, (const
StringPtr)kOCStaplePDEKey);
// no valid key found
if(mIndex == kPPDInvalidIndex)
{
err = kPMInvalidKey;
}
// close the PPD and delete the file
ppdCloseCompiledPPDFromTicket(ppdContext, &tempFSSpec);
}
KOCStaplePDEKey is defined as:
// PPD keys to look for in OCStaplePDE
const unsigned char* kOCStaplePDEKey = "\pOCStaplePDE";
The "*" is not included.
In my PPD the key is defined as:
*OCStaplePDE : True
Hope this is enough help for you.
Gr. Joris
_______________________________________________
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.
| References: | |
| >Re: PPD key (From: Joris Kempen <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.