Building PDF files with JavaScript is simpler than you think. If you use the right tools.
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. Since the PDF is rendered by JavaScript, testing is as simple as running the following on your browser.
Conclusion
Exporting HTML to PDF is a simple task if we use the write tools. Hope it helps.References
See Also
- My journey to 1 million articles read
- Creating ASP.NET Core websites with Docker
- Send emails from ASP.NET Core websites using SendGrid and Azure
- Why use .NET Core
- Package Management in .NET Core
- Importing CSVs with .NET Core and C#
- Export CSVs with in ASP.NET and C#
- Building and Running ASP.NET Core apps on Linux
- Hosting NuGet packages on GitHub
- Generating views in the backend with ASP.NET
- How and why use stronger passwords