Mahesh Bodepudi

Mahesh Bodepudi

  • NA
  • 90
  • 54.8k

How to reduce overlapping text in pdf using rotativa in MVC

Oct 11 2017 11:22 AM
Hi,
 
I am rendering an mvc aspx view to a pdf where the header is overlapping the content in the second page and other pages except the first page where as in the first page it is working fine .
 
Here is my code
 
string footer1 = "--header-left \"Shipper No: " + viewModel.ShipperNo + " " + "Attention: " + viewModel.AttentionTo + "\n" + "Date: " + viewModel.SubmittedDate + " " + "Location: " + viewModel.Location + "\n" + "Shipper Type: " + viewModel.ShipperType
+ " " + "Address: " + viewModel.Address + "\n" + "Order Completed: " + viewModel.OrderCompleted + " " + "City/Sate/Zip: " + viewModel.City_State_Zip + " " + "Page: [page] of [toPage]\"";
return new ViewAsPdf("ExporttoPDF", viewModel) { CustomSwitches = footer1 };
 
Please help me on this.

Answers (2)