1
Answer

How to reduce overlapping text in pdf using rotativa in MVC

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 (1)

0
Photo of Vivek Kumar
NA 7.6k 729.8k 7y
Have a look into the below links.
 
https://stackoverflow.com/questions/19704364/entity-framework-getting-a-tables-column-names-as-a-string-array
 
https://schneids.net/get-table-info-for-your-entities-in-entity-framework/