How can i save my ASP.NET MVC page 开发者_如何转开发as PDF?
There are third party libraries available to do this for you with really good fidelity. I wrote this post that uses a tool I worked on. It has been specifically designed to work in server based environments.
It you want something that's very easy to use. Take a look at https://github.com/andyhutch77/MvcRazorToPdf
Tried and tested in my projects. Just read the documentation. It's as easy as 1, 2, 3. :)
If you encounter some issues go to their github page and click the Issues tab, maybe some of your questions are already resolved there.
P.S.
Some of the PDF libraries that require an executable program to run will not work when your app is deployed to Azure because Azure doesn't support exe files (I guess for security purposes) else you'll create a webjob just for the exe file.
精彩评论