[英]CSV to PDF file in c#
我正在嘗試使用iTextSharp庫將逗號分隔的字符串(CSV)文件轉換為C#中的pdf文件。 我想知道是否有其他免費或更有效的工具/方式用於這種類型的轉換。
您可以使用iTextSharp
這是一個例子:
Document pdfDoc = new Document();
string path = @"c:\file.pdf";
PdfWriter writer = PdfWriter.GetInstance( pdfDoc, new FileStream(path, FileMode.OpenOrCreate));
pdfDoc.Open();
pdfDoc.Add(new Paragraph("your data"));
pdfDoc.Close();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.