Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Differences when exporting chart with custom method vs exportContent

$
0
0
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.


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


Attached Images
File Type: png not blurry chart.png (10.5 KB)
File Type: png blurry chart.png (15.3 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles