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 ticket question, plz.



I've done what you propose (unofficially of course :-) to read/set the printer duplex setting. It does seem to work, but is not guaranteed to be forward compatible. You'll have to walk down the structure till you get the entry you need, modify it, and then put everything back together.

I personally don't understand most of the fields either. I would just concentrate on the com.apple.print.PrintSettings.PMCopies setting and ignore the rest.

Some calls that will be helpful include PMFlattenPrintSettings, CFDataCreateWithBytesNoCopy, ..., CFPropertyListCreateXMLData, and PMUnflattenPrintSettings.

Also, I've seen Ticket manager documentation somewhere. Either on Apple's website or in the Developer folder. Or maybe I just read the appropriate header file. But it seems more geared to PDE authors. When I tried it in my application, the calls didn't give me what I needed.

Maybe you'll have better luck.

Bill



At 9:40 AM -0800 1/5/05, Bui Hung Viet wrote:
Dear all,
I am two months Macintosh/CodeWarrior programmer. I am working on a project that needs to use Carbon-Printing manager. I failed to find any document relating to Printing Ticket.
For instance:
OSStatus PMSetCopies ( PMPrintSettings printSettings, UInt32 copies, Boolean lock );
This function is to set the number of copies to PMPrintSetting. However, I know for sure that there is an alternative way to set this settingvalue. That is to use TicketRef. It is something like setting some ticket value to PMPrintSession in proper way. In this way, we need to know the exact structure of such a ticket reference.
Actually, I printed out the structure of ticketRef, it turns out quite complex. Some points I don't really understand.
<key>com.apple.print.PrintSettings.PMCopies</key>
<dict>
<key>com.apple.print.ticket.creator</key>
<string>com.apple.printingmanager</string>
<key>com.apple.print.ticket.itemArray</key>
<array>
<dict>


<key>com.apple.print.PrintSettings.PMCopies</key>
<integer>1</integer>
<key>com.apple.print.ticket.client</key>
<string>com.apple.printingmanager</string>
<key>com.apple.print.ticket.modDate</key>
<date>2004-12-24T02:11:29Z</date>
<key>com.apple.print.ticket.stateFlag</key>
<integer>0</integer>
</dict>
</array>
</dict>
Should I mimic the same this XML structure and then set to PMPrintSession, shall it work ?
Anyone experienced this stuff please help me.
Thanks a lots.
Regards,
Bui Hung Viet.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Printing mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/printing/email@hidden

This email sent to email@hidden
References: 
 >Printing ticket question, plz. (From: Bui Hung Viet <email@hidden>)



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.