Out of memory on pdf/a conversion

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);
newPdf.OpenAction = null; //open page 1

ok = newPdf.Convert(
Path.Combine(fOut.Directory.FullName, “convertlog.xml”),
Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);
newPdf.Save(resultFile);
newPdf.Dispose();
newPdf = null;

OOM is in newPdf.Convert-call when we concatenate the src file at least 8 times. We need to concat about 80 src files …

- how can we prevent OOM ?
- how can we convert such big pdfs to pdf/a ?

Hi Raimund,

Thanks for contacting support.

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");

Are there any news on this issue?

Hi Raimund,


Thanks for your patience.

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.

We are sorry for this delay and inconvenience.

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?

Hi Stefan,


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.

Thanks for your patience and cooperation.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-40275) have been fixed in Aspose.Pdf for .NET 11.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(2)