• 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
NSTextView pagination
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView pagination


  • Subject: NSTextView pagination
  • From: Jonathan Mitchell <email@hidden>
  • Date: Thu, 07 Jul 2016 17:42:38 +0100

Is there a recommended way to change the content of an NSTextView subclass during an NSPrintOperation preview?
My subclass needs to adjust its content depending on the NSPrintInfo page orientation.
Drawing into the margin with NSView -drawPageBorderWithSize: is not an appropriate solution in this case.

I have tried manipulating the views attributed string content in
- (BOOL)knowsPageRange:(NSRangePointer)range
but this logs CG warnings and can behave unpredictably - presumably because the content is getting manipulated at an inappropriate point.
It also doesn’t produce the correct paginated output.

Any ideas?

I could supply a new view that would correspond to the new page orientation (if I could get an appropriate	 notification) but NSPrintOperation’s -view is readonly.

Thanks

Jonathan



_______________________________________________

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


  • Follow-Ups:
    • Re: NSTextView pagination
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Emailing from a daemon process
  • Next by Date: Re: Emailing from a daemon process
  • Previous by thread: Re: Emailing from a daemon process
  • Next by thread: Re: NSTextView pagination
  • Index(es):
    • Date
    • Thread