lundi 11 janvier 2016

MVCRazorToPDF Adding page header and footer on every pages

Can i make a header and footer on every pages created using MVCRazorToPDF Library On PDFLayout.cshtml file i am making a section for the body of PDF as


And in controller i am calling the action like

return new PdfActionResult(model, (writer, document) =>
            document.SetPageSize(new Rectangle(233, 842, 90));

And my View.cshtml is like a normla html page

@model PDFLAbApp.Models.PdfExample
    Layout = "~/Views/Shared/_PdfLayout.cshtml";
paragraph content repeated n times based on the model content [ its a foreach loop and page size is more than 2 

Aucun commentaire:

Enregistrer un commentaire