开发者

Exporting Microsoft Chart to PDF and JPG formats

In my application, I use Microsoft Chart. Below a generated chart, I开发者_如何学Python have two buttons: "Export to PDF", and "Export to JPG". However, I'm not sure of how to go about implementing these two buttons.

What would be the best way to export the chart to PDF and JPG formats? Thanks in advance for any help.


jPeg is easy:

Chart1.SaveImage(@"C:\MyImage.jpg", System.Web.UI.DataVisualization.Charting.ChartImageFormat.Jpeg);

For PDF, you'll need to get a third party tool (ItextSharp?) or use a PDF printer driver (dopdf). It's not built in.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜