This is a migrated thread and some comments may be shown as answers.

Telerik Reporting as light weight Image/PDF generator

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mike Fleischauer
Top achievements
Rank 1
Mike Fleischauer asked on 19 Aug 2009, 06:02 PM
I am looking at creating a pair of ASHX handlers along the lines of www.site.com/DocAsPDF.ashx and www.site.com/DocAsJpg.ashx.

I was going about it manually, and its not to much effort really, but getting one code path to support both image files and PDF as output is a pain, while also rendering arbitrary html ( My data source to be rendered is an arbitray list of strings in partial html format, for example <DIV>Hi, hows it going</div> could be one line, <B>Fine</B> could be another and lastly <font color:red>RED</font> could be another ) into a jpg actually is a bit of a giant pain in the arse!

So, I got to thinking, hey, I already own Rad Reporting as part of my Rad Controls suite, I wonder if it could do the trick???

So, this is my question.  Would it be feasible from a performance perspective to generate PDF or JPG files on the fly, using Rad Reporting in an ASHX handler, or am I going down a path to ruin?  I would probably be generating a few thousand a day and don't want to put an incredible load on my server ( which I have full control over, so trust issues aren't, um... an issue ), but I would like the results to be relatively real time.  Finally, I need the actual output from the ASHX handler to be an actual JPG or PDF, so I can't use a report viewer.

Should I pursue using Reporting for this, or go a different route?

Thanks,
Mike

( Question is open to anyone, not just telerik, as it is as much opinion as technical.  Assistance appreciated )

1 Answer, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 20 Aug 2009, 03:09 AM
It's definitely feasible and practical to generate PDF documents on-the-fly.  The question boils down to the complexity of the layout and the contents therein as a measure of performance.  Hardware will come into play if you expect to generate many reports concurrently.  Also, you may have to determine if the solution you're considering needs to scale before deciding.  Telerik Reporting, for example, can output Word Documents, PDF documents, TIFFs, and more.  From you're comments, I'm thinking you're wanting the output to be an inline src for an HTML element??   Assuming you're using gdi+ as your JPG solution, I'd go a different route unless you think JPG is the best "final" format for your solution and you don't have too many artifacts.
Tags
General Discussions
Asked by
Mike Fleischauer
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Share this question
or