• 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
dataWithPDFInsideRect and NSPrintOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dataWithPDFInsideRect and NSPrintOperation


  • Subject: dataWithPDFInsideRect and NSPrintOperation
  • From: Gideon King <email@hidden>
  • Date: Fri, 11 Jun 2010 03:06:36 +1000

Hi, I have an offscreen view that I want to get the PDF data from. I use the dataWithPDFInsideRect method, but I have found that this creates an NSPrintOperation. This is a problem because I want to print using different settings for this view only when a *real* print operation is happening. I detect this in my drawing code like this:

	NSPrintOperation *printOperation = [NSPrintOperation currentOperation];
	if (printOperation && ![[NSGraphicsContext currentContext] isDrawingToScreen]) {
		[self doSpecialStuffForPrinting];
	}

Now the problem is that my special printing stuff is being called when I use dataWithPDFInsideRect.

I see there is an -isCopyingOperation method which can tell me whether it is sending to PDF at the time, but that is still not going to differentiate between the print to PDF from the print panel, and the dataWithPDFInsideRect.

Is there any way of telling for sure whether it is a call to dataWithPDFInsideRect that caused the drawing to happen? If not, I guess I'll have to set up some sort of status variable, but I'd rather not if I don't have to.

Thanks

Gideon





_______________________________________________

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: dataWithPDFInsideRect and NSPrintOperation
      • From: Graham Cox <email@hidden>
  • Prev by Date: Custom NSCell mouse events
  • Next by Date: Re: Help tracking down a dangling pointer?
  • Previous by thread: Re: Custom NSCell mouse events
  • Next by thread: Re: dataWithPDFInsideRect and NSPrintOperation
  • Index(es):
    • Date
    • Thread