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 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to