Re: Printing a view + landscape printing
Re: Printing a view + landscape printing
- Subject: Re: Printing a view + landscape printing
- From: Graham Cox <email@hidden>
- Date: Tue, 22 Jan 2013 20:29:13 +1100
All you should need to do is to set the (h,v) pagination mode of the NSPrintInfo to NSFitPagination. That's all I do to scale my entire document to a single piece of paper, and it "just works" in that it takes into account the paper orientation and everything for you.
Note that the view doesn't need to be especially aware of printing unless you have some special requirements such as headers, footers, or alternate formatting. You shouldn't need to examine print info settings to adjust the view's scale - the print system adjusts the coordinate system of the context it manages and the view just blindly works as if it were doing its normal thing.
On 22/01/2013, at 7:50 PM, Jean Suisse <email@hidden> wrote:
> Thank you very much for your reply.
> I can now print the right view. This view (Parent View) has only two large custom subviews in which I display graphics.
>
>> AFAIK, fit-to-page is not a Cocoa printing system feature.
It is.
--Graham
_______________________________________________
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