2017-10-31 3 views
0

3 줄 이상의 텍스트가 포함 된 바닥 글 페이지가 있습니다. 아래 코드를 사용하여 내 PDF에 꼬리말을 표시했지만 2 줄만 표시합니다. 어떻게 높이를 설정합니까? 바닥 글 텍스트 섹션?rotativa에 바닥 글 간격 추가

string header = Server.MapPath("~/Views/Home/PrintHeader.html"); 
     string footer = Server.MapPath("~/Views/Home/PrintFooter.html"); 

     string customSwitches = //string.Format("" + 
           string.Format("" + 
           "--footer-html \"{1}\" " + 
           "--footer-spacing \"0\" " + 
           "--footer-font-size \"10\" ", header, footer); 

답변

0

페이지의 여백을 설정하여 바닥 글의 높이를 변경할 수 있습니다.

return new ViewAsPdf("Report", model) 
     { 
      FileName = fileName + ".pdf", 
      CustomSwitches = customSwitches, 
      PageOrientation = Rotativa.Options.Orientation.Portrait, 
      PageSize = Rotativa.Options.Size.A4, 
      PageMargins = new Margins(10, 3, 20, 3) 
     };