ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to improve StackRadar image resolution on pdf
Posted by Sethu on Aug-29-2013 01:29
Attachments:
Hi,
I am generating StackRadar charts and integrating them into a pdf report using the Java
iText library. My current problem is I am unable to get the original chart resolution in the pdf
generated documents.

Can you please tell me if there is any way / technique to improve the sharpness & resolution
of the image in pdf.

I am attaching the original chart image and the generated pdf chart image for your
reference.

Thanks,
Sethu
original_output.png
pdf_output.png

  Re: How to improve StackRadar image resolution on pdf
Posted by Peter Kwan on Aug-30-2013 02:19
Hi Sethu,

If the chart is generated as a PNG, JPG, GIF or BMP file, and then insert into PDF, then it is like inserting a digital photograph in PDF. The default display resolution on Windows is 96dpi. However, because the PDF can be viewed with different zoom levels, even if the document is created with the image at 96dpi, the actual display may be different in size.

Like a digtial photograph, one general method to increase resolution is to increase the number of pixels. For example, if the original chart is 400 x 500 chart, you may change it to 1200 x 1500 and triples the font size and line widths. You can then insert it at triple the resolution (= 96dpi x 3 = 288dpi) in PDF.

Instead of using PNG, JPG, GIF or BMP, another method is to use vector graphics SVG (google search seems to suggest iText supports SVG and ChartDirector can output SVG images - see BaseChart.enableVectorOutput). In vector graphics, the text in the image is rendered by PDF just like any other text in the PDF and should be just as sharp as other PDF text.

Hope this can help.

Regards
Peter Kwan