Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #37084

    Hi,

    I have an Evaluation license and are see a yellow box around a attachments paperclip, the attachment can’t be opened.
    Is this a restriction of this license?

    Thanks

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

    Hi! Is it reproducible only in a particular Web browser or it appears like that also in Acrobat Reader?
    Could you please share with us a minimalistic PDF sample to illustrate the issue?

    #37087

    Hi,

    attached is a sample, the attachment only opens in Acrobat Reader; It is not in Edge, Chrome and Safari don’t.

    This is how I attached the file, it’s straight from the example from the pd4ml documentation.
    pd4ml.injectHtml(“


    + “<pd4ml:attachment style=\”align: right\” type=\”paperclip\” description=\”test-image.jpg\” src=\”c:\\temp\\test-image.jpg\”/>”
    + “

    “, false);

    Is there a way to make this work in web browsers?
    Thanks
    Bernd

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

    This is the full code used for above pdf:

    PD4ML pd4ml = new PD4ML();
    pd4ml.applyLicense(“xxxxx”);
    pd4ml.setAuthorName(“yyyyy”);
    pd4ml.setDocumentTitle(“zzzzz”);
    pd4ml.enableHyperlinks(false);
    pd4ml.setHtmlWidth(1000);
    //authenticate
    pd4ml.setHttpOptions(null,”user:pwd”);

    // add attachments
    pd4ml.injectHtml(“


    + “<pd4ml:attachment style=\”align: right\” type=\”paperclip\” description=\”test-image.jpg\” src=\”c:\\temp\\test-image.jpg\”/>”
    + “

    “, false);
    // get html
    pd4ml.readHTML(new URL(“https:aaaaaaaaaaaaaaaa/02E1B2F?OpenDocument”));
    // write pdf
    File pdf = new File(“c:\\temp\\000018.pdf”);
    FileOutputStream fos = new FileOutputStream(pdf);
    // render and write the result as PDF
    pd4ml.writePDF(fos);

    #37103

    We need time to investigate. A few years ago, built-in PDF viewers in web browsers did not support PDF annotations at all (technically, a PDF attachment is a type of PDF annotation). There is partial support now, but it appears that Acroread is still the only reliable way to work with PDF attachments.

    #37104

    Thanks,

    that’s alright, no pressure.
    We have a workaround and will not include attachments for now, but it would be great if attachments work in web browsers.

    Thanks
    Bernd

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

You must be logged in to reply to this topic.