Merge multiple PDF files to form a larger one - Aspose PDF .NET Document Merge Limitation

Hi Aspose Team,

We are using Aspose PDF for .NET, version 10.1.0.0. We are experiencing an issue that when we try to merge multiple PDF files to form a larger one, all files together are about the size of 3.91 GB, using Document.Pages.Add(Document.Pages) and Document.Save(Stream) to save it as a Stream object, then an exception was thrown: Stream was too long.
Is there a limit in terms of the file size while merging PDF files to a bigger PDF file?

Thanks

@yiqingliu

There is no such limitation in the API in terms of file size. Instead, it is limitation of MemoryStream in C# for large data. Please try to use FileStream instead of MemoryStream in order to prevent such issue. We hope this helps.

Thank you for the information.