HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › IMG tag with SRC – HTTPS:// › Re: Re: IMG tag with SRC – HTTPS://
OK I have put in place the newest version of the trial library and i still have the problem of images not rendering on a SSL server.
Here is the code that performs the pdf creation:
[language=java:1rum0qmq]public static final void generatePDF(String inputHTML, OutputStream fos,
Dimension format, String fontsDir, String footerBody)
throws Exception {
// the method uses only basic PD4ML API calls
// more info:
// Reference: http://pd4ml.com/reference.htm
// Javadoc: http://pd4ml.com/api/index.html
PD4ML pd4ml = new PD4ML();
pd4ml.setPageInsets(new Insets(20, 10, 10, 10));
pd4ml.setHtmlWidth(1000);
pd4ml.setPageSize(format);
HashMap map = new HashMap();
map.put( “pd4ml.extra.resource.loaders”, “CustomFileResourceProvider” );
pd4ml.setDynamicParams(map);
if (fontsDir != null && fontsDir.length() > 0) {
pd4ml.useTTF(fontsDir, true);
}
if (footerBody != null && footerBody.length() > 0) {
PD4PageMark footer = new PD4PageMark();
footer.setAreaHeight(-1);
footer.setHtmlTemplate(footerBody);
pd4ml.setPageFooter(footer);
}
// pd4ml.enableDebugInfo(); // in Lotus environment the debug info appears under
// File->Tools->Show Java Debug Console
pd4ml.render(new StringReader(inputHTML), fos, new URL(“file:.”), “utf-8”);
fos.flush();
fos.close();
}[/language:1rum0qmq]
This code compiles and executes and still creates a PDF but again with no images. If i copy the HTML that was used to a text file and save it as .html it renders fine in a browser so the HTML is fine …
Can you provide me with anymore help at all???