C# iTextSharp 简单合并PDF(不带书签)
来源:互联网 发布:360拒绝安装软件 编辑:程序博客网 时间:2024/04/29 18:22
public static void MergePdfFiles(string[] fileList, string outMergeFile) { PdfReader reader; List<PdfReader> readerList = new List<PdfReader>(); Document document = new Document(); PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(outMergeFile, FileMode.Create)); document.Open(); PdfContentByte cb = writer.DirectContent; PdfImportedPage newPage; for (int i = 0; i < fileList.Length; i++) { reader = new PdfReader(fileList[i]); int iPageNum = reader.NumberOfPages; for (int j = 1; j <= iPageNum; j++) { document.NewPage(); newPage = writer.GetImportedPage(reader, j); cb.AddTemplate(newPage, 0, 0); } readerList.Add(reader); } document.Close(); foreach (var rd in readerList)//清理占用 { rd.Dispose(); } }
阅读全文
0 0
- C# iTextSharp 简单合并PDF(不带书签)
- C# iTextSharp 带书签合并多个PDF
- C# PDF ITextSharp
- itextsharp 操作合并PDF文件
- itextsharp 操作合并PDF文件
- ItextSharp合并多个PDF
- iTextSharp 合并PDF后删除合并文件
- C#使用iTextSharp打印PDF
- C# pdf 缩放纸型-iTextSharp
- iTextSharp 合并多个PDF文件
- 用itextsharp实现Pdf生成 (C#代码)
- Word转为PDF带书签
- C#调用iTextSharp组件生成PDF文件
- c#调用itextsharp进行Pdf报表设计
- C# 用 iTextSharp 将 PDF 转成文本
- C#使用itextsharp生成PDF文件
- C#使用iTextSharp为pdf添加文字
- C#解析PDF:客户化iTextSharp
- java代理模式
- 订餐系统之同步美团商家订单
- 动画和图形:画布和可绘制对象
- 支付宝:一位五年工作经验架构师的感悟
- TCP/IP模型中提供端到端通信的是哪一层
- C# iTextSharp 简单合并PDF(不带书签)
- Java到底是编译型语言还是解释型语言?
- new ActiveXObject("Scripting.FileSystemObject") 时抛出异常
- WNcry@2o17
- layui-导航栏
- 猎头、培训与咨询的价值(1)——北漂18年(92)
- android的简单分享
- (HDU 6025 女生专场)Coprime Sequence 水题
- spring中几个常用的类及接口分析