Flipped print previews
Flipped print previews
- Subject: Flipped print previews
- From: Jeff Evans <email@hidden>
- Date: Sun, 20 Nov 2016 21:33:32 -0800
p.s. As I was unclear: the image returns YES to flipped and draws on that assumption, looking good. When I say the image in the print dialog is "flipped" I mean that it is backwards - mirrored - the reverse of what it should be - as if it were an unflipped view - until it is drawn a second time.
----
I'm printing from a view-based OSX app (compiled for 10.11), and have found it easy to print by creating a print operation from the view in question. The view is flipped (that is, returns YES to IsFlipped) and looks good on screen. The view creates a print operation this way:
NSPrintOperation* printOp = [NSPrintOperationWithView: self printInfo: [NSPrintInfo sharedPrintInfo]];
//..then setting of margins, etc. in [printOp printInfo], then
[printOp runOperation]
Running the operation does the whole thing and creates a beautiful preview of the page -
BUT not on the first draw. The initial image displayed in the print dialog is flipped and often reduced to miniature. If you touch the pages-to-print choice, or the All choice, the preview image in the print dialog redraws and redraws correctly. The actual print then works fine.
This does make it more difficult print to pdf when the first draw is wrong, since the pdf is also wrong on the first draw. But if I choose "view pdf in preview" then all is well - it draws nicely and I can then use Preview's export command to save it, or print.
But this is no way to live. Don't want to have to tell customers to use a work-around.
There must be something that needs initializing that is corrected after that first draw. Or is this just a glitch?
Thanks, Jeff
_______________________________________________
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