In this article i will show you how to merge multiple pdfs into one using ITextSharp below is the two approach one is to pass your input files path, output file path. Thank a lot. I am looking for a trick to merge pdf files. Thanks. down vote. I used iTextsharp with c# to combine pdf files. This is the code I used. Splitting and merging PDF files in C# using the iTextSharp library.; new content on existing PDF documents, to split and merge existing PDF.

Author: Doulabar Tejora
Country: Libya
Language: English (Spanish)
Genre: Travel
Published (Last): 17 January 2010
Pages: 131
PDF File Size: 1.60 Mb
ePub File Size: 3.80 Mb
ISBN: 535-4-77828-679-7
Downloads: 65435
Price: Free* [*Free Regsitration Required]
Uploader: Faeshicage

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. I gives no errors while compiling.

iText 5 merging PDF documents

I tried to merge the docs first but that went wrong because I’m working with tables. I found a very nice solution on this site: By clicking “Post Your Answer”, you acknowledge ccombine you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. Well i’m trying to merge multiple PDFs in to one.


This is the asp. GetPageSizeWithRotation i ; document. AddTemplate page, 0, -1f, 1f, 0, 0, reader.

iText 5 merging PDF documents | iText Developers

Liquid 1, 1 11 Use PdfCopy instead of PdfWriter. It will be very helpful if you provide some details about how u converted. I hope itextwharp are using iTextSharp for doing the itfxtsharp to pdf converstion. I found the answer: Instead of the 2nd Method, add more files to the first array of input files. GetImportedPage reader, i ; writer. Works like a charm. But I don’t know which iTextsharp version you are using.

We are using iTextSharp. Core which indeed is an unofficial port of iTextSharp v4.

Merging two pdf pages into one using itextsharp | The Forums

AddDocument reader ; reader. Alexei Bondarev 5 9.

Very simple and worked for me. I prefer this solution, since it does not involve the deprecated CopyAcroForm functionality, that is no tiextsharp available in the latest version of itextsharp.

Works perfectly for me with a few documents and last version of itextsharp available on nuget: At least for me, the size saving on the PDF was very significant. FreeReader reader ; reader.


Not in every merging use case the source files are to be deleted! Split ‘,’ ; MergeFiles “C: Write “Success” ; document.

Syed Mohamed 1, 11 Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read ittextsharp updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.

Stack Overflow works best with JavaScript enabled.