Hi
I am converting certain PDF documents to word documents using RecognitionMode.EnhancedFlow and it fails with the error:
com.aspose.pdf.internal.l103p.l0l: Overflow
The code snippet I use is:
Document doc = new Document("Aspose_support_internal_overflow.pdf");com.aspose.pdf.DocSaveOptions docSaveOptions = new com.aspose.pdf.DocSaveOptions();
docSaveOptions.setFormat(com.aspose.pdf.DocSaveOptions.DocFormat.DocX);
/*
Locale.setDefault(Locale.ENGLISH);
docSaveOptions.setRelativeHorizontalProximity(2.5f);
docSaveOptions.setRecognizeBullets(false);RepairOptions repairOptions = new RepairOptions();
doc.repair(repairOptions);
doc.optimizeResources(new OptimizationOptions());
for (Page page : doc.getPages()) {
// Access the image collection from each page’s resources
// The delete() method without parameters removes all images from the collection
page.getResources().getImages().delete();
}
*/
docSaveOptions.setMode(RecognitionMode.EnhancedFlow);
doc.save(output, docSaveOptions);
The commented part are different options I tried to get it not to fail.
Also, using RecognitionMode.Flow works and takes forever but the layout is not what I am looking for, I really need RecognitionMode.EnhancedFlow
Attached is a sample redacted PDF that is causing the issue.
Aspose_support_internal_overflow.pdf (1.5 MB)
Thanks