You should call PdfReader's consolidateNamedDestinations() in advance.
On Mon, Apr 18, 2011 at 12:59 AM, meziano <[email protected]> wrote:
> Hello,
> Using itext 5.0.4 I succed to do the following steps:
> -generate a "dynamic" main-document in memory ("dynamic" means here with
> an
> uknown number of pages)
> -add the index (or better a pseudo table of contents without
> page-number-references) to the main-document
> -add a coverpage to the main-document
> -reorder the so generated pages (of course the coverpage first, the index,
> and the other pages)
> -generate a ToC-Document (Table of Contents) from the main-one (using
> SimpleBookmark.getBookmark(reader), where reader contains the
> main-document)
> with the page-number references.
> -generate the target-document using a PdfSmartCopy and the getImportedPage
> to import the following pages in the given order (first-page of the main
> document, all the pages of the ToC-document, the pages of the
> main-documents
> that come after the index)
>
> My problem: I tryed to use the addNamedDestination and getNamedDestination
> methods to get my destinations (used with setLocalGoto and
> setLocalDestination) updated but this seems not help.
> I must mention, that I used the method setLocalDestination(destination)
> while generating the main-document, and setLocalGoto(destination) while
> generating the ToC-document.
> To let it simple, I didn't mention that I used "page x of y" and others
> things that are not relevant to my problem.
> Any ideas?
> Thank you in advance.
>
> Meziano
>
>
>
>
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/Table-of-Contents-tp3456844p3456844.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php