#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);