Hi there,
I dropped down PD4ml to evaluate today for my company for a project we are doing. I am converting an HTML page generated by xsl and everything is working brilliantly. However, I have one issue. I can not get images to render in the PDF.
<img src="http://chcd-images.crcpress.com/00020000-00029999/00023871.png" height="133" width="380"/>all I get during the render is:
image not yet in cache: http://chcd-images.crcpress.com/0002000 ... 023871.png
not yet in cache: http://chcd-images.crcpress.com/0002000 ... 023871.png
Connection timed out: connect: http://chcd-images.crcpress.com/0002000 ... 023871.pngIf you paste the url into any browser you will see it appears instantly, I tried on another random image from the web and go the same problem. I wonder if you can point me in the right direction.
The code I am using to generate is:
PD4ML html = new PD4ML();
html.enableDebugInfo();
html.setPageSize(new java.awt.Dimension(450, 450));
html.setPageInsets(new java.awt.Insets(20, 50, 10, 10));
html.setHtmlWidth(750);
html.enableImgSplit(false);
response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline; filename=test4.pdf");
if (!request.isSecure()) {
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "-10000");
}
URL base = new URL("file:E:\\temp\\testarrr.jsp");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
html.render(url, baos);
byte[] result = baos.toByteArray();
response.setContentLength(result.length);
ServletOutputStream sos = response.getOutputStream();
sos.write(result);