Including chart into PDF file

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Including chart into PDF file

Post by UserLS » Thu Nov 20, 2008 6:28 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 21, 2008 11:30 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Fri Nov 21, 2008 8:49 pm

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?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Nov 24, 2008 9:07 am

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply