Page 1 of 1

Including chart into PDF file

Posted: Thu Nov 20, 2008 6:28 pm
by 14045174
I create a pie chart, using bevel edge other then none. Save it into EMF stream (I have tried all EmfTypes - no difference) to include it into my report in PDF format (it is taking a part of a page, the rest is generated by other parts of the system). The quality of the image is less than acceptable. Even if I use different types of charts, the image is not as sharp, as I'd like it to be, but this pie chart demonstrates the problem clearly. Any ideas, what I can do, so my report will be presentable?

Posted: Fri Nov 21, 2008 11:30 am
by narcis
Hi Profitstar,

You could try using another image format. For example, TeeChart PNG exports better quality images. Another alternative would be increasing exported images dimensions to increase its resolution.

Posted: Fri Nov 21, 2008 8:49 pm
by 14045174
Yes, PNG format has no problems with colors, but now I have even worse overall quality, since PDF does its own scaling and, unless I am using a vector format, the result is miserable. Any other ideas?

Posted: Mon Nov 24, 2008 9:07 am
by Chris
Hello Profitstar,

As you can read here:
http://msdn.microsoft.com/en-us/library/ktx83wah.aspx
When you use the Save method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
This basically means that there is no native support for metafiles in the .net framework. The metafiles produced by TChart include the metafile format tag in their header and so are treated as metafiles, but with the lack of an encoder there are details which escape the creation process. One of these details seems to be the complex gradients used to render the various Pie Series EdgeStyles. My best suggestion is that you set EdgeStyle to none before export to metafile.

As alternatives, you may like to experiment with TChart's PDF and EPS export formats, but I'm not sure if they are also limited in their capacity to reproduce this type of gradient.