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 (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

Reply via email to