Concatination output corrupted (0kb pdf-file)

In solution using Aspose.Pdf 6.2.0.0 my client regulary experience errors when merging PDF-files. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Files get merged using PdfFileEditror.Concatinate(Stream[] inputStream, Stream outputStream) as follows:

public byte[] MergePdfFiles(IEnumerable<byte[]> fileData)

{

var editor = new PdfFileEditor();

Settings.Strategy = FileProcessingStrategy.OptimizeMemoryUsage;

using (var result = new MemoryStream())

{

editor.Concatenate(fileData.Select(x => new MemoryStream(x)).ToArray(), result);

return result.ToArray();

}

}

When
particular files (with no suspicious attributes as far as I can see) are
involved in the concatenation the output stream becomes e 0Kb corrupted
pdf-file when saved.<o:p></o:p>

No
exceptions are thrown during the concatenation.<o:p></o:p>

I’ve
attached some of example of files that will produce this error.<o:p></o:p>

When
particular files (with no suspicious attributes as far as I can see) are
involved in the concatenation the output stream becomes e 0Kb corrupted
pdf-file when saved.<o:p></o:p>

No
exceptions are thrown during the concatenation.<o:p></o:p>

I’ve
attached some of example of files that will produce this error.<o:p></o:p>

<o:p>Best regards</o:p>

Hi Philip,


Thanks for using our products. I have tested the scenario where I have tried concatenating the source PDF files that you are shared while using Aspose.Pdf for .NET 6.4.2 and I am unable to notice any problem. The resultant PDF is properly being generated. Please take a look over the attached resultant PDF that I have generated. I would recommend you to please try using version 6.4.2 and in case you still face any problem, please share some details regarding your working environment.

We are really sorry for your inconvenience.

Thank you for the fast reply.

Version 6.4.2 seems to have fixed the problem.

Best regard