Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36646

    Hello,
    five years ago I was evaluating pd4ml 3.0.18 and the internal links in an HTML document was not working when exporting in RTF (as in this post: https://pd4ml.com/forums/topic/not-working-internal-hyperlinks-in-rtf-export/ )

    I’ve tried now with the new version, 4.0.17 but it seems to me that the bug is still present and now it does not work even with PDF file output.

    This is the code I used:

    PD4ML pd4ml = new PD4ML(); FileInputStream fis = new FileInputStream(new File("./data/bargle.html")); pd4ml.readHTML(fis); File pdf = File.createTempFile("result", ".rtf"); FileOutputStream fos = new FileOutputStream(pdf); pd4ml.writeRTF(fos, true); pd4ml.writePDF(fos); Desktop.getDesktop().open(pdf);

    There is something to do to fix this problem?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #36648

    Ok, I’ve realized where the problem is: empty anchors are removed.
    I can not use

    as an invisible anchor, but I must use

    somestring

    to have the internal link works.

    #36649

    Hello! As far as I remember, this is only an RTF problem. For PDF output, you can specify empty anchors, but RTF viewers always require that the anchor be assigned to an existing object or piece of content. Creating dummy content (such as whitespace) for empty anchors has an undesirable impact on the resulting document layout

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.