Merge PDF files with iTextDotNet and .NET
In the previous post I showed a class to merge PDF files using iText#, but it seems that there’s a better approach using iTextDotNet:
csharp:
using com.lowagie.tools;
class Program
{
static void Main(string[] args)
{
string[] lista = new string[] { "Meijer.pdf", "P330.pdf", "result.pdf" };
concat_pdf.main(lista);
}
}
class Program
{
static void Main(string[] args)
{
string[] lista = new string[] { "Meijer.pdf", "P330.pdf", "result.pdf" };
concat_pdf.main(lista);
}
}
As you can see this is a cleaner and simpler way to merge pdf files. You can download the iTextDotNet .NET Library from this blog or the official Website.
Arthur 4:41 am on April 4, 2008 Enlace permanente
Hello,
Thank for this post, but :
where do you find com.lowagie.tools ?
Is it a part of the textsharp lib ?
I didn’t find.
Thanks.
Arth’
alex 8:14 am on April 4, 2008 Enlace permanente
It is part of iTextDotNet
RAj 2:00 pm on November 3, 2009 Enlace permanente
Hi alex,
this is really nice…
do you have any idea how to merge the TOC (Table of Contentes) into first page while merging pdf files ?
Regards,
Raj.
Paul 11:48 am on January 7, 2010 Enlace permanente
In the above example where is the merged pdf file?
alex 3:39 pm on January 7, 2010 Enlace permanente
It is stored in the last element of the array (it only merges two pdf files).
Dennis 4:30 pm on July 30, 2010 Enlace permanente
This looks like a great tool. Just what i need for a little tool I am writing at the moment. Sadly, itext.dll ain’t working in my VS2010(vb.net), Vista64bit environment. When I hit debug I always get a “Could not load file or assembly iText.dll or one of its dependencies. An attempt was made to load a program with an incorrect format.”
itextsharp.dll works fine but does not include concat.pdf.
alex 8:38 am on August 2, 2010 Enlace permanente
Dennis, have you tried building yourself a new dll from the IText.NET source code ?