Sometimes you get those requests to "export to pdf" a given web page you developed. Turns out that sometimes, and just sometimes =), it's too complex to produce a custom report, the time to setup a reporting server, the costs, etc, are too impeditive. What can we do?
It can be easily done using two popular javascript libraries: jQuery and the excellent JsPdf.
Here's a snippet, feel free to play it on your end. It works even on your local machine, not needing to deploy it to a webserver.
A simple example
Here's the source code for itHope it helps =)
See Also
Why you should start using .Net CorePackage Management in .Net Core
Importing CSVs with .Net Core and C#Exporting a CSV generated in-memory in Asp.Net with C#
Building and Running Asp.Net Core apps on Linux
Asp.Net / Asp.Net Core: Generating views in the backend
For more posts on .Net Core, please click here.
References
jQuery - HomeJsPdf - Home
JsPdf - Documentation