ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Saving a chart as a pdf file
Posted by jeff on Feb-04-2020 01:52
Hello,

I work with C# and I'm looking for the simplest way to save a chart as a pdf file.

I don't find the answer in the documentation, but maybe I missed it.

An example would be fine.

Thank you

Jeff

  Re: Saving a chart as a pdf file
Posted by Peter Kwan on Feb-04-2020 13:47
Hi jeff,

You can use BaseChart.makeChart. See:

https://www.advsofteng.com/doc/cdnet.htm#BaseChart.makeChart.htm

For example:

c.makeChart("c:/temp/aaa.pdf");

If you use the above code, please make sure the "c:/temp" directory exists, and you have write access to it. If you are writing a web application, please make sure the web server account have write access to the directory.

The followings are some of the web and desktop examples included in ChartDirector that can save the file as PDF.

https://www.advsofteng.com/doc/cdnet.htm#realtimezoomscroll.htm
https://www.advsofteng.com/doc/cdnet.htm#realtimesnapshotweb.htm

Hope this can help.

Regards
Peter Kwan