Re: Printing page breaks in an attributed string?
Re: Printing page breaks in an attributed string?
- Subject: Re: Printing page breaks in an attributed string?
- From: Douglas Davidson <email@hidden>
- Date: Mon, 5 Jun 2006 09:16:34 -0700
On Jun 4, 2006, at 7:17 PM, Joshua Scott Emmons wrote:
Take a look at TextEdit's MultiplePageView. You can insert a
formfeed (\f) character into it and it will cause a page break.
While, empirically, I know this is true (as I've inserted a form
feed and seen the page break) I, for the life of me, cannot figure
out how this is accomplished. It certainly doesn't happen in in
MutiplePageView. That only maps rects to already existing text
views, near as I can tell. I don't see any processing that looks
for formfeed and creates a new "page" (in this case, a text view)
for it.
Is this done automatically by the layout manager? Reading between
the lines of the TextEdit example makes me think that it might be
the case that, if presented with multiple containers that it must
flow text for, the layout manager might interpret a \f as a sign to
"skip to the next container". I can't find any documentation on
this, though. Can anyone confirm that's what's supposed to happen?
It is the typesetter that interprets form feeds, but yes, that is
what happens. There is one notable exception--if the current
container is very long, long enough that the typesetter considers it
to be effectively infinitely long, then form feeds are ignored. The
default size for a text container is of this sort; thus, for example,
form feeds are ignored when TextEdit is not in wrap to page mode.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden