Re: -[PDFView drawPage:] and Printing
Re: -[PDFView drawPage:] and Printing
- Subject: Re: -[PDFView drawPage:] and Printing
- From: John Calhoun <email@hidden>
- Date: Mon, 9 Feb 2009 14:57:58 -0800
On Feb 9, 2009, at 1:28 PM, Kyle Sluder wrote:
I'm overriding -drawPage: in a PDFView subclass with the intent of
layering two PDFs on top of each other. It works great on screen, but
when I attempt to print the document, PDFKit just prints the document
PDFView rather than using my -drawPage: method.
That is true. The PDFPage draw method is instead what is being called
(in fact it is called both via printing and by the PDFView itself in
order to display the PDF).
So, there's the first clue .... try to subclass the PDFDocument/
PDFPage instead and override the -[PDFPage drawWithBox:] method to
composite your two PDF's. This will in fact kill two birds with one
stone.
And in fact a third bird ... saving the PDF will save the composited
PDF as well. :-)
John Calhoun—_______________________________________________
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