Hello, I am still working on copying internal link annotations into a copy of the original pdf. I have the annotations created. Now, I'm having trouble linking them to the correct pages. I can pull the link destination, but it comes back as an indirect reference to the page, and I'm not sure how to translate that into page number.
This is a sample of what I'm trying to do (C# code, sorry): PdfAnnotation newAnnot = PdfAnnotation.CreateLink(stamper.Writer, link.Rect, PdfName.I, link.DestinationPageNumber + tocOffset, link.Destination); stamper.AddAnnotation(newAnnot, link.AnnotationPageNumber + tocOffset); I also tried adding an indirect reference to the link.Destination object (PdfDestination) but that behaved strangely. (Sent me to the wrong page) I assume this doesn't work because I'm inserting many PDF files into one larger file and this causes the references to not match between files. I think this would work if I could get the page number (in the original file) that the link points to. Of course, if there's a better way of doing this, that would be great too :) Thanks, Andy ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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/