Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Labels:
      None
    • Environment:
      Maven xdoc 1.9
    • Number of attachments :
      2

      Description

      Internal links (in blue with Acrobat) are not usefull.
      If we click on it, nothing occurs.

      This issue doesnt prevent the other functionnalities.

      If this issue is too hard to repair, maybe just remove the internal links in the generated PDF...

      1. fo-body.patch
        23 kB
        Lukas Theussl
      2. project2fo.patch
        4 kB
        Lukas Theussl

        Activity

        Hide
        Lukas Theussl added a comment -

        Attached two patches for project2fo and fo-body that make internal links work. It might be considered a bit hacky and probably needs some more testing but it works fine for me and I am not going to spend more time on it so I make it available. Here's what I've done:

        • so far internal links used the generate-id() function which does not work for relative links because the id is unique for the current xml node only. I have replaced that by an algorithm that constructs the id from the path of the current document and the href tag. As such, links should work in complete analogy to the xdoc plugin. In particular, id's are also generated for sub/section names (replacing spaces by underscores, again like xdoc).
        • the patch for fo-body also contains a fix for MPPDF-13: the location of image sources is constructed relative to the location of the current document.
        • the patch for projet2fo also contains a fix for MPPDF-36 with the solution I indicated there, ie, the footer is simply ignored. It might be included somehow in the future, but this at least avoids a complete failure of the pdf generation.
        • a minor fix: in fo-body, the baseline-shift tag in the "sup" template (superscripts) was set to "sup", it should be "super". However, sub- and superscripts still don't work even though they are marked as implemented by the fop project (http://xml.apache.org/fop/compliance.html). This is probably a fop issue so I didn't want to open a JIRA issue for that.

        Finally MPPDF-23 also seems to be fixed, even though this was the case already before applying my patches.

        Show
        Lukas Theussl added a comment - Attached two patches for project2fo and fo-body that make internal links work. It might be considered a bit hacky and probably needs some more testing but it works fine for me and I am not going to spend more time on it so I make it available. Here's what I've done: so far internal links used the generate-id() function which does not work for relative links because the id is unique for the current xml node only. I have replaced that by an algorithm that constructs the id from the path of the current document and the href tag. As such, links should work in complete analogy to the xdoc plugin. In particular, id's are also generated for sub/section names (replacing spaces by underscores, again like xdoc). the patch for fo-body also contains a fix for MPPDF-13 : the location of image sources is constructed relative to the location of the current document. the patch for projet2fo also contains a fix for MPPDF-36 with the solution I indicated there, ie, the footer is simply ignored. It might be included somehow in the future, but this at least avoids a complete failure of the pdf generation. a minor fix: in fo-body, the baseline-shift tag in the "sup" template (superscripts) was set to "sup", it should be "super". However, sub- and superscripts still don't work even though they are marked as implemented by the fop project ( http://xml.apache.org/fop/compliance.html ). This is probably a fop issue so I didn't want to open a JIRA issue for that. Finally MPPDF-23 also seems to be fixed, even though this was the case already before applying my patches.
        Hide
        Arnaud Heritier added a comment -

        Thanks a lot Lukas.
        This is a very good patch.
        I have actually applied it locally but I have a problem generating the maven's doc.
        I must fix a duplicated id error before to commit it.

        Show
        Arnaud Heritier added a comment - Thanks a lot Lukas. This is a very good patch. I have actually applied it locally but I have a problem generating the maven's doc. I must fix a duplicated id error before to commit it.
        Hide
        Lukas Theussl added a comment -

        I just checked myself with the maven docs because I had no problems with any of my projects. Indeed, for maven the pdf generation fails with a duplicate id. This is because the href="/reference/maven-jelly-tags/index.html" tag appears twice in navigation-pdf.xml. This is related to MPPDF-26 which has to be fixed on a more general level. For now, you will have to remove one of the two href's in navigation-pdf.

        Show
        Lukas Theussl added a comment - I just checked myself with the maven docs because I had no problems with any of my projects. Indeed, for maven the pdf generation fails with a duplicate id. This is because the href="/reference/maven-jelly-tags/index.html" tag appears twice in navigation-pdf.xml. This is related to MPPDF-26 which has to be fixed on a more general level. For now, you will have to remove one of the two href's in navigation-pdf.
        Hide
        Arnaud Heritier added a comment -

        patch applied. Thanks to Lukas Theussl.

        Show
        Arnaud Heritier added a comment - patch applied. Thanks to Lukas Theussl.

          People

          • Assignee:
            Arnaud Heritier
            Reporter:
            Vincent Siveton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: