Re: Printing to NSData
On Sep 18, 2009, at 8:35 PM, Gerriet M. Denkmann wrote: Is this a bug or did I miss some magical incantation here? No incantation you've missed. Unless you want to do the pagination and assembly yourself (you probably don't) you will have to write to file and create a new PDF from it. I would test this to see how bad it actually is however. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Printing to NSData
On 22 Sep 2009, at 00:57, David Duncan wrote: On Sep 18, 2009, at 8:35 PM, Gerriet M. Denkmann wrote: Is this a bug or did I miss some magical incantation here? No incantation you've missed. Unless you want to do the pagination and assembly yourself (you probably don't) you will have to write to file and create a new PDF from it. I would test this to see how bad it actually is however. Printing to file (1000 pages) + [ [ PDFDocument alloc ] initWithURL: pdfUrl ] = 14 sec Printing to NSData + [ [ PDFDocument alloc ] initWithData: pdfData ] = 7 sec. So there is an easily noticed difference, but it is not too bad. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Printing to NSData
I am doing: NSPrintOperation *po = [ NSPrintOperation printOperationWithView: textView printInfo: printInfo ]; ... PDFDocument *pdfFile = [ [ PDFDocument alloc ] initWithURL: pdfUrl ]; ... do some post-processing here Works fine, but looks rather inefficient, as file-IO is probably the slowest thing which can be done. So I tried: PDFOperationWithView:insideRect:toData:printInfo: (identical printInfo as before) ... PDFDocument *pdfFile = [ [ PDFDocument alloc ] initWithData: pdfData ]; ... do some post-processing here but the result is just one (very long) page. Is this a bug or did I miss some magical incantation here? Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com