In solution using Aspose.Pdf 6.2.0.0 my client regulary experience errors when merging
PDF-files.
Files get merged using PdfFileEditor.Concatenate(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.
No exceptions are thrown during the concatenation.
I’ve attached some of example of files that will produce this error.
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.
No exceptions are thrown during the concatenation.
I’ve attached some of example of files that will produce this error.
Best regards