PDF Merge/Split for .NET

by fchivu - 7/10/07 2:21 PM

In Reply to: Merging PDF FIles by gumby4

You can build your own PDF merge utility using the PDF Merge and split libraries for .NET from from http://www.dotnet-reporting.com or http://www.winnovative-software.com .
You can use it to merge PDF files, html files, text files and images,
set the page orientation, compression level and page size.

All this can be accomplished with only a few lines of code:

PdfDocumentOptions pdfDocumentOptions = new PdfDocumentOptions();
pdfDocumentOptions.PdfCompressionLevel = PDFCompressionLevel.Normal;
pdfDocumentOptions.PdfPageSize = PdfPageSize.A4; pdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
PDFMerge pdfMerge = new PDFMerge(pdfDocumentOptions);
pdfMerge.AppendPDFFile(pdfFilePath);
pdfMerge.AppendImageFile(imageFilePath);
pdfMerge.AppendTextFile(textFilePath);
pdfMerge.AppendEmptyPage();
pdfMerge.AppendHTMLFile(htmlFilePath);
pdfMerge.SaveMergedPDFToFile(outFile);

You can find the full code sample on the PDF Merge Code Sample page

Regards,
Florin