Re: Simple PDF generation code not working as intended
Re: Simple PDF generation code not working as intended
- Subject: Re: Simple PDF generation code not working as intended
- From: Martin Wierschin <email@hidden>
- Date: Fri, 14 Oct 2011 14:46:44 -0700
> I am trying a simple application to generate pdf from contents in a text view.
Your content view is just a single NSTextView, which won't create a multi-page PDF for you. What you see on screen is what you get when you make a PDF.
You need to create a chain of multiple NSTextView instances (one for each page) that share the same content/layout stream (eg: a single NSTextStorage/NSLayoutManager). They should be contained in a larger NSView that knows how to divvy up the pages by overriding -rectForPage:, etc. See the TextEdit source code as an example.
~Martin
_______________________________________________
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