OK, more information I found out - when clicking the link, sometimes Acrobat 
launches the external application with the full absolute path to the external 
file (i.e., it combines the information from the D word and F word, and 
translates the '.' to the parent Dir of the PDF file, this is Acrobat 7.0.0), 
but sometimes it only provides the path that is defined in the F word (this is 
in 7.0.8)

I am not sure if this is related to the viewer preferences, or the Acrobat 
configuration. 

Can anyone shed light how to deal with this issue?



--- On Wed, 8/27/08, Jianhua Jin <[EMAIL PROTECTED]> wrote:
From: Jianhua Jin <[EMAIL PROTECTED]>
Subject: [iText-questions] Launch/Open external non-PDF file
To: [email protected]
Date: Wednesday, August 27, 2008, 11:27 AM

I need to link a PDF file with some external non PDF files. The external files 
are saved in a location that is fixed relative to the PDF file - if the PDF 
file is saved in c:\pdf, then the external files must be saved under 
c:\pdf\docs. I need to use relative path to reference these files. 

Here is the code I used to set up the link:

             chunk=new Chunk(text, link_font);
             PdfAction action=new PdfAction("dm.xpt", null, "open", ".\\docs");
             chunk.setAction(action);

and here is the link in the PDF file           

127 0 obj<</Border[0 0 0]/Rect[669.16 447.6 729.14
 457.6]/Subtype/Link/C[0 0 
1]/A<</S/Launch/Win<</D(.\\docs)/F(dm.xpt)/O(open)>>>>>>
endobj

But the link does not work SOMETIMES. When click on the link, sometimes it can 
find the file, but sometimes it cant't (I verified that the file is there). I 
use Acrobat 7.0 to view the PDF files. It works if viewed in Windows XP 
(personal computer), but doesnt work in Windows 2000 (corporate network). 

I am using iText version: 2.1.3, JRE 5.0
Any thought would be appreciated.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to