Set font for all text from Pdfptable with Itextsharp

后端 未结 2 975
清歌不尽
清歌不尽 2021-01-26 16:17
var htmlarraylist = HTMLWorker.ParseToList(new StringReader(htmlText), styles);
document.Open();

BaseFont Vn_Helvetica = BaseFont.CreateFont(@\"C:\\Windows\\Fonts\\aria         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-26 16:31

    Please try by setting font to the PdfPTable.DefaultCell property in you foreach loop

    Example:
    t.DefaultCell.Phrase = new Phrase() { Font = fontNormal };
    

提交回复
热议问题