Leonard,
I think I know what you meant now about security - the external files might be
malicious. But that is not the concern here. We need to submit some study data
to FDA for new drug application. The external files are study data files.
Could you please provide your insight on the problem I have?
Thanks
--- On Wed, 8/27/08, Jianhua Jin <[EMAIL PROTECTED]> wrote:
From: Jianhua Jin <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Launch/Open external non-PDF file
To: "Post all your questions about iText here"
<itext-questions@lists.sourceforge.net>, "Leonard Rosenthol" <[EMAIL PROTECTED]>
Date: Wednesday, August 27, 2008, 3:34 PM
Leonard,
I am not sure if I understand your comment. What I am trying to do here is
this: I need to create a PDF file that contains links to some files stored
somewhere in my computer. When i send the PDF file (The FDA), I will package
the PDF file and the external files (lets say in zip). The recipient can then
unzip the package and can view the PDF file with the link to the unzipped files
- I am not asking the PDF file to point to the files on my computer (this is
why I need the relative path, not absolute path)
I know there are tons of other (better) alternatives to PDF in this case, but
PDF is the one I needed.
>From PDF spec or the viewer spec point of viewer, is there a standard on what
>the viewer should do with respect to the 'Launch' action? From what I have
>experienced, Acrobat 7.0 does not have consistent behavior on
external links - sometimes it launches the application with parameter from the
content in the F word only, but sometimes it gives consider the D word as well,
and can recognize the "." as the current working directory.
By the F and D words I mean the following:
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
--- On Wed, 8/27/08, Leonard Rosenthol <[EMAIL PROTECTED]> wrote:
From: Leonard Rosenthol <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Launch/Open external non-PDF file
To: [EMAIL PROTECTED], "Post all your questions about iText here"
<itext-questions@lists.sourceforge.net>
Date: Wednesday, August 27, 2008, 3:07 PM
You are asking for trouble related to security by doing this...
Leonard
On Aug 27, 2008, at 12:33 PM, Jianhua Jin wrote:
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: iText-questions@lists.sourceforge.net
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
iText-questions@lists.sourceforge.net
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
iText-questions@lists.sourceforge.net
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php