• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simple PDF generation code not working as intended
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Simple PDF generation code not working as intended (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: Blocks vs. life, the universe and everything
  • Next by Date: Re: Blocks vs. life, the universe and everything
  • Previous by thread: Simple PDF generation code not working as intended
  • Next by thread: Animating a UITableViewCell changing size
  • Index(es):
    • Date
    • Thread