Fop
  1. Fop
  2. FOP-1539

[PATCH] Adding PDF Launch Action

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: renderer/pdf
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • External issue ID:
      45113

      Description

      [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.

      1. pdfLaunchPatch.patch
        4 kB
        Alexander Stamenov

        Activity

        Hide
        Alexander Stamenov added a comment -

        Attachment pdfLaunchPatch.patch has been added with description: Changes made to add PDFLaunch action on external destinations

        Show
        Alexander Stamenov added a comment - Attachment pdfLaunchPatch.patch has been added with description: Changes made to add PDFLaunch action on external destinations
        Hide
        Andreas L. Delmelle added a comment -

        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?

        Show
        Andreas L. Delmelle added a comment - 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?
        Hide
        Alexander Stamenov added a comment -

        (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.

        Show
        Alexander Stamenov added a comment - (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.
        Hide
        Andreas L. Delmelle added a comment -

        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

        Show
        Andreas L. Delmelle added a comment - 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
        Hide
        Alexander Stamenov added a comment -

        I sent my ICLA to secretary@apache.org as a scan.

        Show
        Alexander Stamenov added a comment - I sent my ICLA to secretary@apache.org as a scan.
        Hide
        Jeremias Maerki added a comment -

        (In reply to comment #4)
        > I sent my ICLA to secretary@apache.org as a scan.
        >

        Confirmed. ICLA is on file.

        Show
        Jeremias Maerki added a comment - (In reply to comment #4) > I sent my ICLA to secretary@apache.org as a scan. > Confirmed. ICLA is on file.
        Hide
        Andreas L. Delmelle added a comment -

        Patch (finally) applied to FOP Trunk.

        Thanks for the input, Alexander! Hope to receive some more in the future.

        Show
        Andreas L. Delmelle added a comment - Patch (finally) applied to FOP Trunk. Thanks for the input, Alexander! Hope to receive some more in the future.
        Hide
        Andreas L. Delmelle added a comment -

        Forgot to include the link to the SVN revision:

        http://svn.apache.org/viewvc?rev=708012&view=rev

        Show
        Andreas L. Delmelle added a comment - Forgot to include the link to the SVN revision: http://svn.apache.org/viewvc?rev=708012&view=rev
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Alexander Stamenov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development