iTextSharp
来源:互联网 发布:汽车维修入库软件 编辑:程序博客网 时间:2024/06/04 21:22
iTextSharp - read an existing pdf, resize it and then draw it on a new one
PdfReader reader = new PdfReader("In.PDF");
Document doc = new Document(PageSize.A4, 0, 0, 0, 0);
PdfWriter writer = PdfWriter.GetInstance(doc,
new FileStream("Out.PDF",
FileMode.Create));
doc.Open();
PdfContentByte cb = writer.DirectContent;
PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1
float Scale = 0.67f;
cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0);
doc.Close();
PdfReader reader = new PdfReader("In.PDF");
Document doc = new Document(PageSize.A4, 0, 0, 0, 0);
PdfWriter writer = PdfWriter.GetInstance(doc,
new FileStream("Out.PDF",
FileMode.Create));
doc.Open();
PdfContentByte cb = writer.DirectContent;
PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1
float Scale = 0.67f;
cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0);
doc.Close();
阅读全文
0 0
- iTextSharp
- iTextSharp
- itextsharp
- iTextSharp
- ITextSharp 使用
- itextsharp整理
- 实战 iTextSharp
- itextsharp操作pdf
- iTextSharp 使用详解
- itextsharp操作pdf
- Itextsharp encrypt pdf document
- itextsharp 显示 日文
- iTextSharp 使用详解
- iTextSharp总页数
- 使用iTextSharp生成pdf
- iTextSharp读取PDF(一)
- iTextSharp读取PDF(二)
- iTextSharp 使用详解(转)
- python 爬虫模拟登陆
- 教你认识各种分辨率的英文缩写
- C++之hello world
- LintCode 解题记录17.10.21
- Nginx
- iTextSharp
- 一元线性回归预测法
- C++ 指针调用
- C语言:字符串函数的实现
- 协同分割co-segmentation
- PY-append,time,print,datetime用法
- MyBatis框架的工作原理
- 笔记————C#数据库内容的查找
- Linux下的crontab定时执行任务命令详解