Dear,
In an application, I wanted to create hyperlinks between PDFs with
inherit zoom. but with the script below, it does not work (or seem to
work) with both ways to implement a Gotor. Any help ?
public class test
{
public static void main(String[] args) throws DocumentException,
FileNotFoundException
{
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document,
new FileOutputStream( "c:\\pvk\\tree
walk\\inherit\\file1.pdf"));
document.open();
PdfAction act = PdfAction.gotoLocalPage(1,
new PdfDestination(PdfDestination.XYZ, -1, -1, -1),
writer);
writer.setOpenAction(act);
Paragraph paragraph = new Paragraph("");
paragraph.setIndentationLeft(10 );
paragraph.setLeading(0, 1f);
Font font = new Font(Font.TIMES_ROMAN, 7, Font.NORMAL);
font.setColor(new Color(0x00, 0x00, 0xFF));
Chunk ch = new Chunk("this is a link to file3", font );
ch.setAction(new PdfAction("file3.pdf", 1 ));
paragraph.add(ch);
document.add(paragraph);
document.add(new Chunk("go to file2: ").setAction(
PdfAction.gotoRemotePage("file2.pdf",
"test", false, true)));
document.close();
}
}
Thank you and kind regards,
Pieter
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
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