HTML to PDF / DOCX / RTF Java converter library Forums PD4ML Forums Technical questions / Troubleshooting Issue with relative references to a fragment within the same file

Viewing 1 post (of 1 total)
  • Author
  • #34087


    HTML file contains relative reference to a fragment within the same file:
    <h2>reference to a file<a class="link" href="test_references.xhtml#figure_ID">Figure</a></h2>
    When PDF is generated, such link references to an absolute path where original xhtml file is located, which is inaccessible for end users from PDF. And anyway, behavior expected by user would be to scroll to the fragment within PDF.
    I assume that library resolves this url the same way like any other link to image or css, generating absolute path based on url of original HTML. But this is still the same file, so we would expect it to resolve to a fragment within a PDF, not to file.
    Could you please clarify whether this is expected behavior? And if the answer is yes, are there possible options how to solve issue using PD4ML tuning?

    P.S. It works properly when href attribute points to the fragment ID only:
    <h2>reference to a fragment in file<a class="link" href="#figure_ID">Figure</a></h2>

    Please see sample HTML, resulting PDF and java code attached.

    You must be logged in to view attached files.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.