2017-10-31 5 views
0

にフッター間隔を追加し、私は高さを設定するのですか、私は私のPDFファイルにフッターを表示するには、以下のコードを適用しているが、それは唯一の2行を示していフッターテキストセクション?私はテキストの3つの以上の行を含むフッタページのHTMLを持って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) 
     }; 
関連する問題