문제

I am following this tutorial. http://www.battlehorse.net/page/topics/charts/save_google_charts_as_image.html

This is the demo page. http://www.battlehorse.net/attach/topics/charts/google_charts_to_image.html

When we click on Convert to Image button, javascript convert the canvas to image. I want to use that pie chart to generate a PDF report which happens at server side.

Could you please advise the best solution for this? Thanks.

도움이 되었습니까?

해결책 2

I found another way to do this.

I created SaveImage.aspx which accept form post data(Base64String(data:image/png;base64), and file name) and save the file.

On button click, I generate the google chart and send ajax post data(data:image/png;base64) to SaveImage.aspx and that page save the image. And then generate the PDF using that image.

Feel free to point out if you guys have a better solution.

다른 팁

You have already got the image from canvas so the rest is a duplicate of here: JPG to PDF Convertor in C#

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top