Hello,
We are trying to implement functionality in our application to use a headless browser to generate charts which can be emailed to users. I followed your suggestions in your server side docs for getPdfRenderer(). Below is the relevant code returning a byteArrayOutputStream that we can then insert into our Database and email out on a schedule.
However, the resulting PDF is very blurry compared to the PDF produced using your native exportContent method. Do you have any idea why? I've attached two images showing the difference.
We are trying to implement functionality in our application to use a headless browser to generate charts which can be emailed to users. I followed your suggestions in your server side docs for getPdfRenderer(). Below is the relevant code returning a byteArrayOutputStream that we can then insert into our Database and email out on a schedule.
However, the resulting PDF is very blurry compared to the PDF produced using your native exportContent method. Do you have any idea why? I've attached two images showing the difference.
Code:
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); Map<String,String> settings = new HashMap<String,String>(); settings.put("skinName", exportData.get("skinName").toString()); PdfExport export = new PdfExport(); ITextRenderer renderer = export.getPdfRenderer(exportData.get("chartHTML").toString(),settings); renderer.createPDF(byteArrayOutputStream); return byteArrayOutputStream.toByteArray();
Comment