On 6/26/2014 5:34 PM, Gaurang Haldankar wrote:

Hi,

I am using the latest version of IText (itextpdf-5.5.1.jar). I am trying to load a PDF using IText and saving it again without making any changes in another PDF. I am attaching the code for your reference. The issue is that when I create this new PDF, the hyperlink is not present. Can you suggest any code changes that preserves the hyperlink in the newly created PDF.


Your code is wrong. It seems that you preferred following unofficial examples rather than reading the official documentation. Please download http://manning.com/lowagie2/samplechapter6.pdf

In the Summary, you'll find a table that explains that all interactive features (such as hyperlinks) are lost when you use PdfWriter. It explains that you should use PdfStamper instead (or PdfCopy if more than one document is involved).

The chapter contains several examples. Don't waste time copy/pasting bad examples. Read the official documentation and you'll save plenty of time.
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to