Bug 45113 - [PATCH] Adding PDF Launch Action
Summary: [PATCH] Adding PDF Launch Action
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: trunk
Hardware: PC Windows XP
: P3 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-01 23:35 UTC by Alexander Stamenov
Modified: 2012-04-01 06:50 UTC (History)
0 users



Attachments
Changes made to add PDFLaunch action on external destinations (4.36 KB, patch)
2008-06-01 23:35 UTC, Alexander Stamenov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Stamenov 2008-06-01 23:35:27 UTC
Created attachment 22049 [details]
Changes made to add PDFLaunch action on external destinations

[PATCH] Adding class to handle the Launch PDF action. The Launch action will be used in the cases when a fo:basic-link has as external-destination something of the form file://<file_name>. In the moment everything that is not a .pdf file is treated as a URI action.
Comment 1 Andreas L. Delmelle 2008-06-02 10:50:01 UTC
Interesting! Thanks for the patch.

The only thing I'm wondering about is the order of the tests in PDFFactory: after your change, /all/ URIs using the file-protocol will generate a /Launch action. If I'm correct, the test for the .pdf extension should happen first (?)

Since it does include one new file, we have to ask: 
Does Apache already have your ICLA on file from contributions to other projects?
Comment 2 Alexander Stamenov 2008-06-02 11:13:09 UTC
(In reply to comment #1)
> Interesting! Thanks for the patch.
> 
> The only thing I'm wondering about is the order of the tests in PDFFactory:
> after your change, /all/ URIs using the file-protocol will generate a /Launch
> action. If I'm correct, the test for the .pdf extension should happen first (?)

I am glad you find this patch useful.
At first I added this check as penultimate in order to honor the special treatment of PDFs. After that I decided that specifying the protocol has to be with more weight. But I think this is the place for people more involved in the project to decide that particular order.
 
> Since it does include one new file, we have to ask: 
> Does Apache already have your ICLA on file from contributions to other
> projects?

 The short answer is no. Actually it is now that I understand for the ICLA. I found this addition very small so if it is ok with the community I have no objections to contribute this code without the ICLA.
 If any further documenting is needed to meet any criteria I am willing to do it. After all this will be my first contribution to an open source project. :)

Comment 3 Andreas L. Delmelle 2008-09-19 12:22:51 UTC
Hi Alexander,

Apologies for the rather long delay. I'm afraid I lost track of this... :-(

I finally found some time to play with it, and it seems that the following would fail:

file:///path/to/link_target.pdf#dest=name

OTOH, looking closer, this has nothing to do with your patch, I believe. Using an absolute file-URI with a destination appended simply fails. Using a relative URI with a destination always works.

Using an absolute URI without a destination didn't work before your patch, but using the /Launch action seems to correct this.

I'm inclined to go ahead with the commit. Since it contains one new file, however small, as I mentioned earlier, an ICLA should best be submitted (see: http://www.apache.org/licenses/#clas). That is, if you intend on continuing to supply us with patches in the future... I promise, it does not always take this long to process a bug. ;-)

Can you let us know when this is done, so we can follow up?

Thanks

Andreas
Comment 4 Alexander Stamenov 2008-10-22 00:58:40 UTC
I sent my ICLA to secretary@apache.org as a scan.
Comment 5 Jeremias Maerki 2008-10-22 01:03:42 UTC
(In reply to comment #4)
> I sent my ICLA to secretary@apache.org as a scan.
> 

Confirmed. ICLA is on file.
Comment 6 Andreas L. Delmelle 2008-10-26 09:33:54 UTC
Patch (finally) applied to FOP Trunk.

Thanks for the input, Alexander! Hope to receive some more in the future. ;-)
Comment 7 Andreas L. Delmelle 2008-10-26 09:35:19 UTC
Forgot to include the link to the SVN revision:

http://svn.apache.org/viewvc?rev=708012&view=rev
Comment 8 Glenn Adams 2012-04-01 06:50:06 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed