Charset Export chart to PDFFormat wrong german spelt .NET

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jdooley
Newbie
Newbie
Posts: 3
Joined: Tue Aug 22, 2006 12:00 am

Charset Export chart to PDFFormat wrong german spelt .NET

Post by jdooley » Mon Sep 10, 2007 9:09 am

Hi All,
Please help me!
I have a problem when exporting my chart to a PDF file.
Any text that contains special characters like öäüÖÄÜ, this are coming in the PDF file incorrect, although in the screen it's ok.
I have tried setting up the Charset to different type without success.

Is there any place else where can I set the Charset ?
Am I doing something wrong?
This is the code I am using:


protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
GetEvaluationRating();
Steema.TeeChart.Export.PDFFormat pdfPage = new Steema.TeeChart.Export.PDFFormat(WebChart1.Chart);

MemoryStream mem = new MemoryStream();

pdfPage.Save(mem);

byte[] bytes = mem.GetBuffer();

HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Clear();

// HttpContext.Current.Response.Charset = "ISO-8859-1";
// HttpContext.Current.Response.Charset = "UTF-8";
HttpContext.Current.Response.Charset = System.Text.UTF8Encoding.UTF8.WebName;
HttpContext.Current.Response.ContentEncoding = System.Text.UTF8Encoding.UTF8;
HttpContext.Current.Response.ContentType = "application/pdf";

HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename=FsPe_Chart_{0}.{1}","007", "pdf") );

HttpContext.Current.Response.BinaryWrite(bytes);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
}
Last edited by jdooley on Mon Sep 10, 2007 10:01 am, edited 1 time in total.

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

Post by Narcís » Mon Sep 10, 2007 9:58 am

Hi jdooley,

Yes, this is a known problem. We've been investigating a solution to this problem but a good solution hasn't been found yet.
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

Post Reply