When I attempt to export teechart as PDF issues are arising. Using The latest version of TeeChartNET2016_4.1.2016.05120
Here is what my code looks like on the backend c-sharp:
Steema.TeeChart.Export.PDFFormat pdfFormat = chart.Export.Image.PDF;
pdfFormat.Width = chartWidth;
pdfFormat.Height = chartHeight;
pdfFormat.Save(filePath);
For other formats all is working well (jpeg, png, gif, png, bmp). However, with the pdf export above a blank pdf doc is produced. Pdf doc can be opened it is simply a blank page.
Thanks for any advice here,
John
TeeChart Export PDF format
Re: TeeChart Export PDF format
Hello John
Seems is necessary redraw the Chart before export to Pdf format. The code below shows you how can do that:
Hoping this helps you.
Thanks in advance
Seems is necessary redraw the Chart before export to Pdf format. The code below shows you how can do that:
Code: Select all
private void InitializeChart()
{
// Load the ArrayLists that have been processed
fastLineSeries1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
fastLineSeries1.Clear();
fastLineSeries1.FillSampleValues(100);
tChart1.Header.Lines = new string[] { "Second Curve: ILD" };
this.tChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.None;
this.tChart1.Axes.Left.Logarithmic = true;
this.tChart1.Axes.Bottom.SetMinMax(0.01, 10);
tChart1.Draw();
Steema.TeeChart.Export.PDFFormat pdfFormat = tChart1.Export.Image.PDF;
pdfFormat.Width = tChart1.Width;
pdfFormat.Height = tChart1.Height;
pdfFormat.Save("TestImage.pdf");
}
Thanks in advance
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |