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.
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?
(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. :)
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
I sent my ICLA to secretary@apache.org as a scan.
(In reply to comment #4) > I sent my ICLA to secretary@apache.org as a scan. > Confirmed. ICLA is on file.
Patch (finally) applied to FOP Trunk. Thanks for the input, Alexander! Hope to receive some more in the future. ;-)
Forgot to include the link to the SVN revision: http://svn.apache.org/viewvc?rev=708012&view=rev
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed