Search code examples
asp.netinternet-explorerpdfabcpdf

How to Convert my ASP.NET Page to PDF?


I have the following acceptance criteria for creating a pdf file from my asp.net page which contains nested RadGrid controls:

  1. The current view of the page should be converted to PDF which means that the viewstate and session information of the current page request should be taken into account. This leaves me with only one option; make the PDF conversion at Page_Render() event handler of the current session when a new pdf postback is sent.

  2. The asp.net page layout is changed using JQuery at the time of the $(document).ready(...) that means that not only the rendered HTML should be converted to PDF but also the javascripts have to run on it to have the desired layout changes in the final PDF file; e.g. column alignments, etc. I hope it would be possible otherwise ...

  3. The asp.net page only appears correctly in IE 6+ therefore the PDF tool which is used must use IE rendering engine.

Please could you advise which tool can help in such scenario?

I downloaded and tested EvoPdf tool but it doesn't support IE rendering engine apparently (only FireFox rendering) and couldn't make the javascripts enabling work correctly with it.

I'm going to evaluate ABCPdf and Winnovetive but I'm not sure they would support what I want.

If I could find no tool to help with the above, another possible solution might be just taking a screenshot of the page using client script (don't know whether it'd be possible), then sending it to the server and finally converting that image to pdf.

Many thanks,


Solution

  • winnovative did exactly what I needed :) it uses IE rendering engine unlike EvoPdf.

    I haven't had time testing other tools.

    Thanks