设置页边距与iTextSharp的 [英] Set page margins with iTextSharp
本文介绍了设置页边距与iTextSharp的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个具有嵌入在AA PDF表单域模板的PDF文件。我使用PdfStamper填写这些字段。此外,我希望能够更改页边距为生成的PDF。有没有什么办法可以修改页边距上加盖PDF?
I have a template PDF file that has a a PDF form field embedded in. I am using PdfStamper to fill out these fields. In addition, I would like to be able to change the margins for generated PDF. is there any way I can modify the page margins on the stamped PDF?
推荐答案
现在的唯一途径我是这样的。
Only way I now of is like this.
iTextSharp.text.Rectangle rec = new iTextSharp.text.Rectangle(pageWidth, pageHeight);
Document doc = new Document(rec);
doc.SetMargins(0f, 0f, 0f, 0f);
不过,这将限制利润率
However, this will limit margins to
这篇关于设置页边距与iTextSharp的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文