Working with iTextSharp - Manipulating PDFs with iTextSharp
(Page 3 of 4 )
On a recent project, I was given the requirement of assembling large policy packets for an insurance client. The client had each piece of the policy either in a static PDF or in a file that would be dynamically converted to PDF. We wanted to get to an end result where the packet would be a single PDF, so it would be easier to store and would require only one print job, so there was no chance of part of it being lost.
The problem was that the packet was different based on each individual policy, so we had to find a way to dynamically combine anywhere from 3 to 20 PDFs into one document. iTextSharp was the solution.
iTextSharp makes it easy to merge multiple PDFs into a single document, using some code posted at http://itextsharp.sourceforge.net/examples/Concat.cs. Simply download the code, and you’ll be able to easily concatenate multiple PDFs into a single PDF. You can compile the code as a Console application and use it as-is, or you can modify it and use it directly in your application.
Additional code for splitting PDFs, creating PDFs with four pages per page sheet to make handouts, and encrypting PDFs is available from http://itextsharp.sourceforge.net.
Getting Support
Support for iTextSharp is limited to a mailing list hosted at the project’s SourceForge site (http://sourceforge.net/projects/itextsharp/).
iTextSharp in a Nutshell
Using iTextSharp, you can integrate the highly popular PDF document format into your
applications very easily, with no additional cost. iTextSharp is an excellent alternative to the high-priced PDF libraries and provides the same, if not more, features as most of those packages.
Next: 4.13 For More Information >>
More BrainDump Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the book Windows Developer Power Tools, written by James Avery and Jim Holmes (O'Reilly; ISBN: 0596527543). Check it out today at your favorite bookstore. Buy this book now.
|
|