使用ITextSharp创建可填写的PDF表单
我使用包含可填写字段的Acrobat Adobe 8创建了一个PDF文件。
I have created a PDF file using Acrobat Adobe 8 that contains fillable fields.
是否可以使用ITextSharp而不是Adobe进行编程?
Can that be programmed with ITextSharp instead of Adobe?
注意:我并不是指填写PDF与ITextSharp相反,我想使用ITextSharp 创建 PDF文件中的可填写字段。
Note: I am not referring to filling out the PDF with ITextSharp, instead I would like to create the fillable fields on the PDF file using ITextSharp.
任何代码都将受到赞赏。
Any code would be appreciated.
谢谢您的时间!
您可以创建包含的PDF使用iText [夏普]的可填写字段,但它们看起来不如Adobe Acrobat,这是一个更好的设计工具。
You can create PDFs that contain fillable fields with iText[Sharp], but they won't look as nice as Adobe Acrobat, which is a much better design tool.
通过可填写字段,我猜你的意思是 TextField 。这是一个链接一些简单的示例代码来自这本书让你入门。具体来说,看一下 CreatePdf()
和 CellLayout()
方法,以及 iText API 如果您需要更多信息。
By fillable fields, I'm guessing you mean a TextField. Here's a link with some simple example code from the book to get you started. Specifically, take a look at the CreatePdf()
and CellLayout()
methods, and the iText API if you need more information.