个Document
利用iText五步创建一个PDF文件:helloword。
第一步,创建一个 iTextSharp.text.Document对象的实例:
Document document = new Document();
第二步,为该Document创建一个Writer实例:
PdfWriter.getInstance(document, new FileStream("Chap0101.pdf", FileMode.Create));
第三步,打开当前Document
document.Open();
第四步,为当前Document添加内容:
document.Add(new Paragraph("Hello World"));
第五步,关闭Document
document.Close();
完整的代码见示例代码
自己慢慢啃吧,现在没有中文版本的,尤其现在iText基于AGPL授权协议后,已经放弃新版本的研究。
中文版的没有,英文版的,在CSDN和爱问上都有!