iTextSharp 可以用来生成包含流动文本之间的字段的 PDF
iTextSharp 可以用于生成包含流动文本之间的字段的 PDF,例如
Thankyou for choosing "ProductNameField". We would ...
我想使用 iTextSharp 从数据库填充“ProductNameField”。然而,字段的长度不是固定的,因此如果字段值的长度较小,则使用表单字段会在周围留下空格,或者如果字段值长于给定的空格,则会导致溢出。我查看了 Adobe LiveCycle 生成的“浮动文本字段”,但找不到从 iText 使用它们的方法。
Could iTextSharp be used to generate PDFs containing the fields in between flowing text e.g.
Thankyou for choosing "ProductNameField". We would ...
I would like to fill the "ProductNameField" from DB using iTextSharp. However the length of the field is not fixed so using form fields leaves the spaces around if the field value is smaller in length or causes overflow if the field value is longer than the space given. I looked in to "floating text field" generated by Adobe LiveCycle but could not find a way to use them from iText.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用动态文本创建 PDF 有两种基本方法:
前者允许人们使用 Adobe Acrobat/Reader 填写 PDF,但存在固定长度字段的限制。
第二个选项是 iTextSharp 的用途。您告诉 iTextSharp 写一个段落,它会为您完成。如果您获取一些静态文本并将其与数据库相结合,或者用户输入的数据并不重要,iTextSharp 只需要文本。
是的,iTextSharp 可以做到这一点。
您正在使用现有的 PDF 还是从头开始创建 PDF?
There's two basic ways to create PDFs with dynamic text:
The former allows people to fill out PDFs with Adobe Acrobat/Reader but has the limitation that you saw of fixed length fields.
The second option is what iTextSharp is about. You tell iTextSharp to write a paragraph and it does it for you. If you take some static text and combine it with the database or user entered data doesn't really matter, iTextSharp just wants text.
So yes, iTextSharp can do this.
Are you working with an existing PDF or are you creating a PDF from scratch?