We have some pdf/a files which are first concatenated using PdfFileEditor. After this step pdf/a is lost, so we the second step is to convert the resulting pdf file back to pdf/a using Document.Convert
This throws out of memory exceptions.
Sample file attached. i.e. concat 3 times succeeds with ~800MB process size.
Code for concat:
PdfFileEditor pdfDocNew = new PdfFileEditor();
pdfDocNew.CloseConcatenatedStreams = true;
pdfDocNew.Concatenate(inputFiles, resultFile);
pdfDocNew = null;
Code for conversion:
Aspose.Pdf.Document newPdf = new Aspose.Pdf.Document(resultFile);
I have tested the scenario using latest release of Aspose.Pdf for .NET 11.3.0 and I am unable to notice any significant memory hike issue. However when trying to convert resultant file to PDF/A_1b format, I have managed to notice OutOfMemory problem. For the sake of correction, I have logged this problem
as PDFNEWNET-40275 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.
[C#]
Document doc = new Document("c:/pdftest/src.pdf");
Document newdoc = new Document();
for (int i = 0; i <= 3; i++)
{
newdoc.Pages.Add(doc.Pages);
}
newdoc.Convert("c:/pdftest/log.txt", PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
newdoc.Save("c:/pdftest/Concatenated.pdf");
I am afraid the issue reported earlier is pending for review as the team has been busy fixing other previously reported issues. However the team will surely start investigating/fixing this problem as per their development schedule and as soon as we have some definite updates, we will let you know.
Since we have paid priority support now, the ticket should be resolved ASAP. Are there still tickets in front of the queue or what do I have to do to get it solved? Do I have to pay more?
Thanks for your feedback. Your above reported issue is already treated with high Priority.
Furthermore, we have good news for you, your above reported issue has been resolved and its fix will be available in upcoming release of Aspose.Pdf for .NET i.e. 11.8.0 and it will be published soon. We will notify you as soon as it is released and gets available for download.