Jason Frank wrote:
I understand the idea, but I can't figure out one piece of the puzzle.
WhenI'm creating the ToC for the second time, I can easily figure out
the correctpage number to put next to each ToC entry, based on the
SimpleBookmarks that I retrieved earlier from my main document and on
the number of pages in the ToC (as you suggest).
OK.
But at that time, the destinations that I'd like to associate with the
ToC entries do not exist in the ToC document -- they are for pages
that I'm going to append later. How can I make each ToC entry point to
a destination that does not exist yet? Maybe this is possible, but I
don't know how to do it.
You're right, I overlooked the fact that we need an indirect reference
to the page object instead of just the pagenumber. You can only create
the destination if the page already exists.
I see two possible work arounds (maybe Paulo can give you some more
alternatives):
Or you work with named destinations. This is done in the IndexEvents class.
Or you process the content PDF first, add the ToC with the destinations
and reorder the pages with PdfWriter.reorderPages..
br,
Bruno
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions