After upgrade to visual studio version 17.8, there is somethings wrong in pdf bottom position as below
I'm currently using Rotativa.AspNetCore 1.3.2 with the below parameters
return new ViewAsPdf(view_name, model, view_data)
{
PageSize = Rotativa.AspNetCore.Options.Size.A4,
PageOrientation = Rotativa.AspNetCore.Options.Orientation.Portrait,
PageMargins = new Rotativa.AspNetCore.Options.Margins(2, 0, 5, 0),
//PageMargins = { Left = 0, Right = 0 },
//PageWidth = 180, // it's in millimeters
//PageHeight = 277,
CustomSwitches = "--disable-smart-shrinking",
ContentDisposition = Rotativa.AspNetCore.Options.ContentDisposition.Inline
//FileName = _doc_uri + fileName
//SaveOnServerPath = _doc_
};
1.Visual studio 17.6
- css for the bottom div element
#invoice_bottom {
padding-top: 5px;
margin-left: 30px;
border-top: 1px solid #ddd;
height: 100px;
width: 720px;
position: fixed;
left: 0;
bottom: 10px;
}
@media print {
@page {
size: A4 portrait;
margin: 0;
@bottom-center {
/ *content: element(footer);*/
}
@top-center {
/*content: element(header);*/
}
}
html, body {
width: 210mm;
height: 297mm;
display: block;
}
}
I have no clue on this problem at all. Could you please help