• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 657
  • Last Modified:

output aspx page "as is" to pdf

Hello there. I’m looking for a component that helps me to create a pdf from a page containing image, gridview, html, text and it is styled with a linked stylesheet.

The page is rendered using database and code behind calculations and displayed to the customer.  I then have a “save as pdf” button on there.  What I don’t want to have to do is recreate step-by-step the entire page again – it’s already there in memory.  However, it’s an aspx page and not an html page, so I’m just curious if I can use a tool to just simply output the html generated by the aspx code direct to pdf?

I've seen many examples converting existing ".html" files from a url but I haven't found anything that converts what has just been rendered.

I tried using itextsharp, but it just generates an ugly plain page without formatting colours and styles.
0
carled
Asked:
carled
1 Solution
 
carledAuthor Commented:
Oh and importantly the page contains an ms chart component rendered to screen on the fly and that needs to be included on the pdf!
0
 
piyush_soniCommented:
Why don't you use CutePDF to do that?
0
 
carledAuthor Commented:
Well, maybe I'm missing something, but that looks like a document converter?  I'm after something that runs on my web server (I'm developing the website) that allows the website user to "save this result page as a pdf" and it creates the pdf using the html code rendered by the aspx page...?

Am I missing something here?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
RameshSCommented:
0
 
carledAuthor Commented:
at $600? No thanks!  I did it in the end using wkhtml2pdf (free) by redoing the page with inline styles and cut-down graphics and things. A real p.i.t.a. but it achieved the desired results without shelling out silly money.
0
 
piyush_soniCommented:
Oops. Sorry, I did not notice you are developing a website and you want your users to do that. I thought you want to do that :) Appologies.
0
 
geekdad1Commented:
wkhtml2pdf can use external stylesheets.  You need to include the full url to the stylesheet (http://...) for it to be able to find it.
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now