Yes and no. :-)

Now as a caveat I must say, that I haven't looked into text box positioning, 
but I assume that it will be similar to graphics position.

In that case there are several positions where the text box could be anchored. 
To the page, the paragraph, the margin,... So if you roughly know which page 
you are currently adding text to, then you could add an absolutely positioned 
text box at that point and it should appear on that page. Of course no 
guarantees. On the first page this is easy, because you just add it as the 
first element and it is guaranteed to be there. Same for the last page. In 
between it is harder. Basically you end up with a trial and error process 
that hopefully produces a result that is relatively consistent across 
different Word versions and installations.

If you've ever tried to absolutely position text or graphics in Word, then you 
know of the joys of randomly jumping text and RTF isn't much more than a text 
serialisation of Word's internal structure.

Greetings,
Mark

On Thursday 31 May 2007 00:26, mister bean wrote:
> This is probably off-topic on this list, but aren't the limited
> paragraph-positioning codes in RTF still subject to the vagaries of
> pagination, thereby making absolute location quasi-impossible, barring
> unusual kinds of docs? (i.e., you can locate a paragraph on the page, but
> you can't know beforehand which page). I defer to you as the RTF maven, of
> course, but am curious. TIA,
>
> ---Mister Bean
>
> Mark Hall-6 wrote:
> > Hi,
> >
> > I'll reply to the original e-mail.
> >
> > Yes, in theory it is possible, but iText does not support this. The only
> > way
> > would be to read the RTF specification and add the required RTF codes
> > directly via the RtfDirectContent class.
> >
> > Greetings,
> > Mark
> >
> > On Wednesday 30 May 2007, Ruskin Dantra wrote:
> >> Hi All,
> >> I have already searched examples and mailing list archive and I found
> >> next
> >> to nothing on this topic.
> >>
> >> Is it possible to add elements (text including) to a rtf file at an
> >> absolute position? I know that rtf is very different from pdf but just
> >> wondering if there is way to do this using itext...I wouldn't mind it
> >> being
> >> complicated, as long as it is possible.
> >>
> >> Any help on the matter will be appreciated.
> >>
> >> Cheers
> >> Ruskin
> >
> > --
> > Q:  What does it say on the bottom of Coke cans in North Dakota?
> > A:  Open other end.
> >
> > My GPG public key is available at:
> > http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > Buy the iText book: http://itext.ugent.be/itext-in-action/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to