Re: Printing a view + landscape printing
Re: Printing a view + landscape printing
- Subject: Re: Printing a view + landscape printing
- From: Jean Suisse <email@hidden>
- Date: Tue, 22 Jan 2013 11:20:36 +0100
On 22 janv. 2013, at 10:29, Graham Cox wrote:
> On 22/01/2013, at 7:50 PM, Jean Suisse 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.
Indeed it is.
Thank you so much for this valuable piece of information.
Here's the code that made it work:
NSPrintInfo* sharedPrintInfo = [NSPrintInfo sharedPrintInfo];
[sharedPrintInfo setHorizontalPagination:NSFitPagination];
[sharedPrintInfo setVerticalPagination:NSFitPagination];
[sharedPrintInfo setOrientation:NSLandscapeOrientation];
Now, the result fits one page, in landscape mode. However, the aspect/ratio of the view remains the same as displayed on screen.
How can I change the size (bounds) of the view and its subview but for printing only ? I could stretch the result, but the text on the graphics would appear stretched. ..
_______________________________________________
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