We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting error when converting to searchable PDF

Hi Aspose support,
I am getting an error when converting an hocr output from tesseract-OCR to a searchable PDF using the inputPDF.convert(cbgh) function for converting unsearchable PDFs. Please advise on the error?

Below is the error message:

java.lang.RuntimeException: class com.aspose.pdf.internal.ms.System.z9: Value does not fall within the expected range.
com.aspose.pdf.internal.p642.z3.m1(Unknown Source)
com.aspose.pdf.internal.p75.z1.m1(Unknown Source)
com.aspose.pdf.internal.p75.z1.m1(Unknown Source)
com.aspose.pdf.internal.p67.z1.m1(Unknown Source)
com.aspose.pdf.internal.p63.z4.m1(Unknown Source)
com.aspose.pdf.internal.p63.z4.m2(Unknown Source)
com.aspose.pdf.internal.p22.z4.(Unknown Source)
com.aspose.pdf.internal.p22.z4.m1(Unknown Source)
com.aspose.pdf.internal.p45.z1.m1(Unknown Source)
com.aspose.pdf.internal.p45.z1.m1(Unknown Source)
com.aspose.pdf.internal.p45.z1.m1(Unknown Source)
com.aspose.pdf.internal.p22.z6.m1(Unknown Source)
com.aspose.pdf.XImage.saveInternal(Unknown Source)
com.aspose.pdf.XImage.m1(Unknown Source)
com.aspose.pdf.XImage.m1(Unknown Source)
com.aspose.pdf.XImage.save(Unknown Source)
com.aspose.pdf.internal.p93.z9.m1(Unknown Source)
com.aspose.pdf.ADocument.convert(Unknown Source)
com.aspose.pdf.Document.convert(Unknown Source)

@bckoh_ncs_com_sg

Thank you for contacting support.

Would you please share source document along with narrowed down code snippet so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.PDF for Java 19.3.