Hi,
Thank you for considering Aspose.
Afer investigating the problem, I think a possible factor of the error might be the I/O delay in the process of transfering data (from memory to disk) of PdfFileEditor.Concatenate(string, string) method. It's a little like the classical Producer-Consumer problem.
step 1. (Producer) merging pdf files to object .pdf using the Concatenate(): here the object .pdf file is created and the I/O start (writting data from source files to the object file)
step 2. (Consumer) reading or downloading the object .pdf file from a response page: there would be errors if the I/O has not been finished(eg, a big file)
It's difficult to affirm the real factor(s) for the problem of this web application, and I am not sure the above analyse be quite right. Please try the following solution (written in pseudocode, please translate them to your real code) and give us feedback. If it works, then we could add a new flag in the class PdfFileEditor to indicate whether the I/O operation finished or not, to solve the problem.
...
StartMergePDF;
if (new PDF file Found )
{
wait(some time); // here "some time" should be variable according to the PDF file size, or be rather a long time for all possible big files.
Response.redirect(PDFpath);
}
...
Thanks,
Felix Liu
Developer
Aspose Changsha Team
About Us Contact Us