Page 1 of 1

Charset Export chart to PDFFormat wrong german spelt .NET

Posted: Mon Sep 10, 2007 9:09 am
by 9642260
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();
}

Posted: Mon Sep 10, 2007 9:58 am
by narcis
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.