converting Carbon printing to Cocoa
converting Carbon printing to Cocoa
- Subject: converting Carbon printing to Cocoa
- From: Chinh Nguyen <email@hidden>
- Date: Tue, 1 Apr 2008 18:05:43 -0500
My currently Carbon app can not only print the contents of a document
in memory but also one from a disk without loading it. It does this
by using PMSessionBeginDocument(), PMSessionBeginPage(), etc... and
drawing each line of the document (in my own file format). When
printing a file off disk, this method is very efficient since you
don't have to wait for the document to finish loading (which can be
potentially very large) before printing and it consumes very little
memory since it only needs to maintain a buffer of just one line as it
creates pages to print.
Cocoa makes printing my document in memory very easy but I can't find
equivalent methods that give me the level of control I need for
printing a file of indeterminate size without loading it. Is what I'm
attempting possible or am I just going to have to load my document
before printing it?
PS. [[NSPrintPanel printPanel] runModal] seems to crash and I can't
figure out why.
-Chinh Nguyen
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden