We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Concatenating a varying number of PDF files


I am evaluating your Aspose.Pdf product to see if it's something my department could use in our VB.NET 2010 projects.

How can I concatenate a varying number of PDF files? The code example that you have in the link below is for a specific number of pdf files. I was looking at #3 - "Concatenate multiple PDFs using Array of Streams".


How would you code using Aspose.Pdf if you have different amounts of PDF files that need to be concatenated and not just three pdf files? The code I’m looking for would be getting a collection of files that could be from 1 to a varying amount of files. For example, it could be 1 file, 4 files, 8 files, 15 files, etc. that needs to be concatenated. The code would have to be able to handle different PDF file amounts.

Could you show me some code that could handle concatenating 1 to some number of PDF files dynamically? I would not want to dimension a different filestream for each PDF file that I would potentially need to concatenate. This is crucial functionality that we would need from your product.


Bruce Stewart

Hi Bruce,

Thanks for using our products.

You may check the following documentation links for details and code snippets as per your requirement.

Concatenating all PDF files in Particular folder

Concatenate multiple PDF files using MemoryStreams

Please do let us know if you need any further assistance.

Thanks & Regards,