使用IText创建PDF
第一步:
安装库itext
关键:还需要安装
itext.bouncy-castle-adapter
Portable.BouncyCastle
第二步 hello word
public static void CreatePdf(String dest) { //Initialize PDF writer PdfWriter writer = new PdfWriter(dest); //Initialize PDF document PdfDocument pdf = new PdfDocument(writer); // Initialize document Document document = new Document(pdf); //Add paragraph to the document document.Add(new Paragraph("Hello World!")); //Close document document.Close(); }
第三步:
第四步:

浙公网安备 33010602011771号