I am processing the HTML representation in ASP.Net MVC in PDF using the Rotativa ViewAsPdf method. I set the output from A4, Portrait and borderless by setting:
new ViewAsPdf(MVCCfpFormatter.Members.Views.FlightPlansFullPagePrint, model) { // FileName = flightPlan.ListingItemDetailsModel.FlightDetails + ".pdf", PageSize = Size.A4, PageOrientation = Orientation.Portrait, PageMargins = new Margins(0, 0, 0, 0), PageWidth = 210, PageHeight = 297 };
Then in CSS, I set an element with a width of 210mm , which should extend the entire width of the page, but in the output PDF format, the width of 210mm does not represent the entire width of the PDF file but less. According to the results of trial and error, the total width of the generated PDF file is about 246mm .
Any ideas why this could be happening?
asp.net-mvc asp.net-mvc-4 rotativa
Mark cassar
source share