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

    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: )

    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?


    You must be logged in to view attached files.

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

    as an invisible anchor, but I must use


    to have the internal link works.


    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.