More efficient code to make a iTextSharp template in ASP.NET MVC?

0

I just did a project to generate PDF's using the iTextSharp library in ASP.NET MVC (C #), however, I would like to know which code is most efficient and easy to use to have a template that generates PDF using iTextSharp in ASP. I need to be able to insert this header and footer always the same (logos / name / address / date) and in the body of the PDF images and / or text! What code to put in the Controller / Model / View?

    
asked by anonymous 07.07.2016 / 10:38

1 answer

0

The most effective code includes using a library that I authored . Works with all versions of iTextSharp, including version 4, which is built into the project. The general idea is to transform a View Razor into PDF.

Here are examples of use .

If you only want to use iTextSharp from version 5 onwards, you can directly use MVcRazorToPdf .

    
07.07.2016 / 14:52