Print Tickets and Cocoa?
Print Tickets and Cocoa?
- Subject: Print Tickets and Cocoa?
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 11 Feb 2003 15:58:36 +0000
I was given this advice from the company that makes a receipt printer
which I'm trying to beat into submission, but it seems to be targeted
at Carbon Printing -- there doesn't seem to be anything about print
tickets in the Cocoa printing API, and the drawer/cutter options aren't
included in the NSPrintInfo dictionary AFAICT. Any people intimately
familiar with printing want to help me out? :-)
1. Create a small application that opens the print dialog and
prints a receipt.
2. After the print dialog opens have the user configure the Star
TSP600-Raster Options tab for No Cash Drawer
3. Upon the user hitting the print button the application should
first dump the print ticket (this is an Apple defined data structure)
to
an XML file called something like "NoDrawer.xml" (there are functions
in
the OS that allow Print Tickets to be written out as XML).
4. Then, print something to complete the print loop (described in
the Carbon doc set)
5. Repeat from step 2 for each different printer configuration
your
customer wishes to use.
6. Then, your man will have a set of configuration files for later
use. Here is how he will use them:
7. In the real application, instead of opening the print dialog,
simply read back in the appropriate XML config file to the original
Print Ticket structure (this is another OS function documented in the
Carbon API)
8. Submit the newly formed Print Ticket along with print data for
printing.
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.