Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

OutOfMemoryException while converting PDF to PDF/A

$
0
0
Hi,

we have a PDF file, which throws an OutOfMemoryException when executing this line of code:

newPdf.Convert("convertlog.xml", Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);

This file has 30 pages. Another PDF I have at hand has 60 pages and is converted in about 6 seconds. 
How can I trace down the issue with the problematic PDF? I tried version 8.9.1 and 9.7.0 - same result.

I see tons of 
"A first chance exception of type 'System.IO.EndOfStreamException' occurred in mscorlib.dll" Details: "Unable to read beyond the end of the stream."
entries in output while debugging.  This happens for both files: ~2100 for problematic pdf, ~120 for other PDF.
May this be an issue? You know that it's never a good idea to use exceptions to control the behavior of the application. This looks to me like trial and error programming.

Viewing all articles
Browse latest Browse all 3131

Trending Articles