Mobile app version of vmapp.org
Login or Join
Deb1703797

: PDF conversion on website using ASP.NET platform 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

@Deb1703797

Posted in: #AspNet #LookingForAScript #Pdf

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.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

2 Comments

Sorted by latest first Latest Oldest Best

 

@Becky754

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.

10% popularity Vote Up Vote Down


 

@Sent6035632

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).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme