Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Attachments in Evaluation Mode
    #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

    in reply to: Attachments in Evaluation Mode
    #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("<div>"
            		  + "<pd4ml:attachment style=\"align: right\" type=\"paperclip\" description=\"test-image.jpg\" src=\"c:\\temp\\test-image.jpg\"/>"
            		  + "</div>", 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);

    in reply to: Attachments in Evaluation Mode
    #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("<div>"
            		  + "<pd4ml:attachment style=\"align: right\" type=\"paperclip\" description=\"test-image.jpg\" src=\"c:\\temp\\test-image.jpg\"/>"
            		  + "</div>", false);

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

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)