Can PDFSharp create Pdf file from a Html string in Net Core?
I recently ran into the exact same issue myself. There is currently extremely limited ways in dealing with PDFs in general in .NET Core. To go through them...
- PDF Sharp - Does not support .NET Core/Standard.
- SelectPDF - Does have a "free" community version hidden in their website footer. Should be useable in most cases. https://selectpdf.com/community-edition/
- IronPDF - "Enterprise" pricing. Starts at $1.5k
- WKHTMLTOPDF - This is actually just an executable that someone has written a C# wrapper over the top to run the exe. Not a great solution.
- iTextSharp - Has "hidden" pricing but apparently this is the only one that specifically will run on Linux under .NET Core (If that's important to you).
IMO the only free one that will do what you need is SelectPDF. And that's saying something because I don't rate the library or the API. But it's free and it works.
More info : https://dotnetcoretutorials.com/2019/07/02/creating-a-pdf-in-net-core/
Convert HTML to PDF in ASP.NET MVC
I have used Canvas to PDF and that worked great for me. Here is the perfect tutorial for the same: https://www.freakyjolly.com/jspdf-multipage-example-generate-multipage-pdf-using-single-canvas-of-html-document-using-jspdf/
Thank you everyone.
Related Topics
Convert Webpage to Image from Asp.Net
Encrypt and Decrypt a String in C#
How to Make a Textbox That Only Accepts Numbers
Deserialize Json Object into Dynamic Object Using Json.Net
How to Make the Script Wait/Sleep in a Simple Way in Unity
How to Get a User'S Client Ip Address in Asp.Net
How to Prevent the App from Terminating When I Close the Startup Form
Join/Where With Linq and Lambda
String Was Not Recognized as a Valid Datetime " Format Dd/Mm/Yyyy"
Why Is It Important to Override Gethashcode When Equals Method Is Overridden
How to Dynamically Compile and Execute C# Code Fragments
Pass Method as Parameter Using C#
Use of Finalize/Dispose Method in C#
C# String Replace Does Not Actually Replace the Value in the String