Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending web-content to PDF, Excel, Flash, JPG?

Status
Not open for further replies.

brucegonewild

Programmer
Jan 25, 2008
22
CA
I display a set of data through a Chart (using Telerik Chart) and a data-grid... What I'm required to do is to save everything displayed on the page (as displayed on the page) in the following formats:
.pdf
.xls
flash
and jpeg.

Any idea on how to go about this?? I was hoping to be able to get a screen capture (programatically) and create a binary stream and go about writing to the files in above format... I'm not quite sure if this is a possibility at all (doing a screen-capture programmatically)...

Any how I apreciate any suggestion you may have :)

cheers!
 
I would question the value of the web page in each of these formats. but then if it's a directive reason doesn't matter:)

instead of trying to "export" the webpage to each of these formats, I would collect the data (presenter/controler) and format each one individually.

for PDFs I like to use crytal reports and export the data to pdf.
xls I use Calros.Args XML XLS writer
I haven't worked with flash, but i believe you can feed a flash template data, just like a webform.
if you need an image I would use crystal for that as well.

I would setup a controller for each format.
Code:
interface IController
{
   void Render();
}
WebController : IControler
{
}
PDFController : IControler
{
}
JpegController : IControler
{
}
XlsController : IControler
{
}
FlashController : IControler
{
}
then in each one set the formatting.
since your also using a 3rd party charting tool there may be options within the control to export as well.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top