How can i save my ASP.NET MVC page as PDF?
相关问题
- MVC-Routing,Why i can not ignore defaults,The matc
- Generic Generics in Managed C++
- Correctly parse PDF paragraphs with Python
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
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.