views:

185

answers:

2

From my code I display an .aspx page with infragistics chart controls in it. I want to send out the same .aspx page as a PDF attachement through email without displaying the .aspx page on the screen. How can this be done.

A: 

How does the ingragistics control operate? Does it become a gif/png/etc? Or is it ActiveX/flash/etc?

For image-based graphs, there are a range of tools that will do the job of scraping html+images to pdf, including HTMLDOC, ABCpdf, etc. Generate your PDF, and use the file as an attachment.

You'll still need a web-server to generate the image - but you never have to view the page; it becomes essentially a glorified web-service.

Marc Gravell
+1  A: 

Why not just send out the URL that generates the graph in the email and let the user determine how they want to save it? Presumably you can construct a url that encodes all the parameters needed -- which you'll need if you're going to construct it programmatically anyway (at least if you want it to be easy). Alternatively, you could have an HttpHandler (ashx) which does the conversion (as @Marc describes) and sends the PDF back. Either way you make your email smaller.

tvanfosson