This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Chart not rendered properly

costanzazanoletti wrote on 2016-04-27:
Hi,
I'm trying to convert this url:

http://e116.webratio.com:8081/GetReportC.do?pcp20s=5114&pcp21s=49&pcp22s=8KLeoyMF&pcp23s=1

with the java API. The page contains two charts and they are visible in the pdf too, but the positioning is not correct (pdf attached).
Do you have any suggestion on what I can change in my js or css to mak it work?

Thank you very much
support wrote on 2016-04-28:
Hello,

We investigated this issue bud didn't find out why the charts are rendered to PDF incorrectly. If possible, you can try to fiddle a bit with related css and js code and check to see if it helps.
costanzazanoletti wrote on 2016-04-28:
Thanks for your reply.
I converted the same url (http://e116.webratio.com:8081/GetReportC.do?pcp20s=5114&pcp21s=49&pcp22s=8KLeoyMF&pcp23s=1) from your website (https://pdfcrowd.com/#convert_by_url) and in that case the conversion was correct: the charts are in the right position (pdf attached).

Can you please tell me which settings I can apply to my java class to get the same result? At the moment I'm using your java class template

// convert a web page and save the PDF to a file
fileStream = new FileOutputStream("google_com.pdf");
client.convertURI("http://www.google.com/", fileStream);
fileStream.close();

Thanks
support wrote on 2016-04-28:
Please try to add this line before convertURI() and let us know if it helps
client.setHtmlZoom(100);
support wrote on 2016-04-28:
You may also want to set the page orientation to landscape:
client.setPageWidth("298mm");
client.setPageHeight("210mm");
costanzazanoletti wrote on 2016-04-28:
Thank you very much, the zoom did the job!