开发者

Fill in PDF with fields [closed]

开发者 https://www.devze.com 2023-03-22 12:44 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I have a few PDFs from various customers/vendors. My goal is that I am building a web app where a potential customer fills out a single form of data and then can generate all of the PDF's to print and sign.

The PDF's have fields in them that in adobe reader you can click and type in the data. However, this is sensitive financial data, and the PDF won't let you save to your desktop. There is actually a warning in adobe reader when you open the pdf and it prevents you from saving a completed form. I don't care about this feature. My users can save it if they want to take the risk if it becomes opened up when I generate the completed pdf myself.

The problem is that I need to generate these pdfs with my data injected into them without altering the style. I want t开发者_StackOverflow社区o avoid manually building them, but I will if I have to. How can I generate the exact PDF format they gave me with the data filled in?


You could have a look at iTextSharp and the PdfStamper class - it allows you to load up an existing PDF, 'stamp' data into the fields and then flatten out the PDF which can be sent to the user:

http://sourceforge.net/projects/itextsharp/

Note that iTextSharp is paid for for commerical products - but there may well be other open sources librarires that can do this.


You may try Aspose.Pdf for .NET to achieve your goal. You can fill the form fields using this component. If you do not want to allow the users to edit this data once it is filled in the PDF, you may flatten the fields as well. This will not change the existing layout of your PDF. The API is very simple along with complete documentation and support.

Disclosure: I work as developer evangelist at Aspose.

0

精彩评论

暂无评论...
验证码 换一张
取 消