Pdf Files while Concate is failing with Aspose.PDF

Hello Support Team - Thanks in Advance for your great support at this forum.
We have Aspose.PDF license. Tried with both Aspose.PDFand Aspose.PDF.Drawing latest version.
At our .Net Core with AWS Lambda.
Recently at one of our upstream lambda upgraded into latest version 23.12.0 (Aspose.PDF.Drawing)
This lambda converts html files into pdf.
At downstream lambda that combines multiple pdf files into one pdf. It was working fine before the upstream lambda upgradation.

Throwing the error at this line pdfEditor.Concatenate

Error : Stream was not readable.
at Aspose.Pdf.Facades.PdfFileEditor.#=zuDPoNcE=(Stream[] #=zfj9mPPQ=)
at Aspose.Pdf.Facades.PdfFileEditor.Concatenate(Stream[] inputStream, Stream outputStream)

Code Portion:

using (MemoryStream finalPdfStream = new MemoryStream())
{
if (pdfStreams != null && pdfStreams?.Count() > 0)
{
LoggerService.Log($“Lambda Max time exceeding : All pdf files combined in this run is: [{filesCombined}]”);
bool success = pdfEditor.Concatenate(pdfStreams, finalPdfStream);
byte[] combinedPdfContent = finalPdfStream.ToArray();
finalPdfFile = combinedPdfContent;
pdfStreams = null;
}
}

                                        await _combineFileService.SavePDFFile(finalPdfFile, tempFinalPDFFolder);

Hello Support Team,

Instead of using pdfEditor.Concatenate

I am planning to use this concept to combine multiple pdfs into 1 pdf Aspose.pdf Document.Pages.Add

@a.shah

Have you tried this approach already? Did it resolve your issue?

Also, can you please share the complete stack trace information for our reference along with some sample files? We will log a ticket in our issue tracking system and share the ID with you.

Hello Support Team,

I have used this concept “Aspose.pdf Document.Pages.Add” and rewritten code logic and then issue is resolved.

@a.shah

It is nice to know that your issue has been resolved. Please keep using the API and feel free to create a new topic in case you face any issues or need any kind of assistance.