Closed NessfertIndia closed 9 years ago
Hi, I usually use CSS page breaks to control content on new pages.
page-break-before, page-break-after
I would do a loop and output page-break-after.
I think I got the original idea from here:
http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html
My code for generating pdf file is this:
public ActionResult Print(int id) { var record = db.Records.Find(id); return new PdfActionResult(record, (writer, document) => { document.SetPageSize(new Rectangle(600f, 400f, 90)); document.NewPage(); }); }
How to return a PdfActionResult with multiple pages for each record if i have a list of records? Either from controller itself or from Razor html page ? I have'nt seen any options in documentation