【导出pdf】 c# 利用iTextSharp导出pdf
2021-05-03 00:27
标签:write file iter ase ntc alt arp files highlight 【导出pdf】 c# 利用iTextSharp导出pdf 标签:write file iter ase ntc alt arp files highlight 原文地址:http://www.cnblogs.com/qifei-jia/p/7753519.html public static bool ToPdf(DataTable dt, string filepath, string fileName)
{
Document document = new Document();
PdfWriter.GetInstance(document, new FileStream(filepath + fileName, FileMode.Create));
document.Open();
BaseFont bfChinese = BaseFont.CreateFont("C:\\WINDOWS\\Fonts\\simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font fontChinese = new iTextSharp.text.Font(bfChinese, 12, iTextSharp.text.Font.NORMAL, Color.BLACK);
PdfPTable table = new PdfPTable(dt.Columns.Count);
for (int i = 0; i
文章标题:【导出pdf】 c# 利用iTextSharp导出pdf
文章链接:http://soscw.com/index.php/essay/81563.html