Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to give users an option to download the web page of my website they are currently viewing. I have searched and found 3rd party windows software which convert the pages, but I am looking for an app that I can have on my website.

I am using C# on a ASP.NET platform.

share|improve this question
up vote 0 down vote accepted

I want to give users an option to download the web page of my website they are currently viewing.

It sounds like you're trying to convert your HTML output into PDF output, is this correct?

One of the best tools I've encountered for this is wkhtmltopdf. It's built on top of the Webkit rendering engine, the same engine that powers Safari, Chrome and the built-in browsers on Android devices and the iPhone.

Usage is pretty darn simple -- just a simple shell command pointing it at the HTML file in question and giving it the desired output filename. There are more options if you need them. I'm not sure how you'd go about actually making shell calls in the land of ASP.NET though.

While versions for Windows are available, I've only ever used it in a Linux environment, so YMMV. You will obviously need the ability to install programs on your server, which implies Administrator access.

share|improve this answer

I believe what you want to do is change the content disposition response header in the output you send back to the user. Have a look at the HttpResponse.TransmitFile method. Here is an additional article that may help too (can probably find several others that are similar).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.