Reputation: 2242
We have recently got a client that have the ability to send files (text files) inside a PDF file.
Is there some kind of library that can get or add attachment files to PDF? I have searched the web and only found PDF File Attachments (an Adobe blog post).
Upvotes: 2
Views: 3381
Reputation: 5681
iTextSharp is a free .NET port of the Java library iText that can let you do what you want. Documentation, however, is rather scarce on the ported library and you will often need to refer to Java documentation to get an idea of how to do things and/or google other peoples' attempts at doing what you need to do.
The code in itextsharp-questions, Attach file is doing exactly what you want to do with this library.
Edit 25/11/2016
The above link is dead and the code that used to work no longer works for recent iTextSharp. Please check iTextSharp for PDF - how add file attachments? for code. Thanks to @guyl for pointing that out in his comment.
Upvotes: 6