Search code examples
c#asp.netasp.net-coreprinting

Is there a functionality to Print Data from database or from datatables in desired format with desired header?


So basically Iam working on a .netCore web application and I have all of the data I want to print in a DataBase, but I want to include a header and a user who printed this and a number of pages in case the list of objects I want to print will be more than one A4 paper The Layout I want to achieve I have all the fields aviable in my app and I need the comisioned field to stay empty so user can later on write something with a pen

I just want to know what should i use and how to make it so It will execute a print window in windows and contain the extra header and number of pages

I have experience only with build in Print button in dataTable plugin

I tried to use print via JS and print via DataTable plugin Both of which i was unable to add the header for the documents and number of pages to be printed


Solution

  • For anyone wondering what to use QuestPDF Is a great tool, because it has a preview window where you can actually see how the document will be looking and it is quite easy to use. Similar to iTextSharp except that the preview window is not aviable using iTextSharp