• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[PDFView drawPage:] and Printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: -[PDFView drawPage:] and Printing
      • From: Kyle Sluder <email@hidden>
References: 
 >-[PDFView drawPage:] and Printing (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Where is ${EXECUTABLE_NAME} defined?
  • Next by Date: Re: Transparent image
  • Previous by thread: -[PDFView drawPage:] and Printing
  • Next by thread: Re: -[PDFView drawPage:] and Printing
  • Index(es):
    • Date
    • Thread