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 No I’ve When No I’ve
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>
exceptions are thrown during the concatenation.<o:p></o:p>
attached some of example of files that will produce this error.<o:p></o:p>
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>
exceptions are thrown during the concatenation.<o:p></o:p>
attached some of example of files that will produce this error.<o:p></o:p>