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 protected])
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 [email protected]