Creating PDF in MVC 5 using ITextSharp For a long time I have been looking for free and cheaper ways of creating pdf documents within MVC. I have tried all the other options and none was able to give me the standard of document I wanted. After long and tiresome nights of trying to figure out the solution I stumbled upon ItextSharp... This was my life changer. Maybe it might be for you too.. Process Download ItextSharp using the Nuget Package manager and if you prefer using command line arguments you an use: Install-Package iTextSharp full documentation to this can be retrieved here Create a class that will be used to write the data you created as a byte array. How this works can be found here or here public class BinaryResult : ActionResult { private byte[] _fileBinary; private string _contentType; private string _fileName; public BinaryResult(byte[] fileBinary, string contentType, string fileName) { _...
"Emancipate yourself from mental slavery, none but ourselves can free our minds!" - Bob Marley