Printing PDF Bytes: Best Way (?)
Printing PDF Bytes: Best Way (?)
- Subject: Printing PDF Bytes: Best Way (?)
- From: email@hidden
- Date: Fri, 6 Sep 2002 09:19:02 -0700
Hello:
I have an application that produces PDF content on the fly based on a
selection of a template, user controlled parameters, and a particular
datasource (a desktop reporting app if you will). In my initial
prototype, I have been writing the PDF data to file and asking
NSWorkspace to open it (thus allowing it to be viewed in the designated
PDF viewer). Unfotunately, I can't do this in the final product because
when the content is printed, I need to ensure that it's not scaled
(Preview & Acrobat will scale the PDF document if it doesn't fit within
the print area of the designated printer).
So... I added a simple Preview panel to my app that at the moment
contains an NSImageView and a Print button. Before popping up the
panel, I call [myImageView setImage:[[[NSImage alloc]
initWith
Data:myPDFData] autorelease]] to hand the PDF content to the
view. Things go bad, however, when I later try to print this image by
calling [myImageView print:sender] (the target of the print button).
Instead of the PDF representation being sent to the printer, I get a
bitmapped "screenshot" of the view.
My question, given this scenario, what is the most effecient and most
accurate way to send PDF data to a printer?
Thanks for your input...
- Eric Hanson
Incarna LLC
_______________________________________________
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.