-
Notifications
You must be signed in to change notification settings - Fork 136
An ArrayIndexOutOfBoundsException occurred while converting a PDF to a DOCX file. #59
Description
code:
public void test(){
String pdfPath = "/home/test/test.pdf";
String docxPath = "/home/test/test.docx";
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(htmlDestPath);
DocSaveOptions saveOptions = new DocSaveOptions();
saveOptions.setMode(DocSaveOptions.RecognitionMode.Flow);
saveOptions.setFormat(DocSaveOptions.DocFormat.DocX);
pdfDocument.save(exportPath, saveOptions);
}
exception:
java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:424) at java.util.ArrayList.get(ArrayList.java:437) at com.aspose.pdf.internal.l0j.ly.lf(Unknown Source) at com.aspose.pdf.internal.l0j.ly.lI(Unknown Source) at com.aspose.pdf.internal.doc.ml.MlParagraphConverter.addParagraph(Unknown Source) at com.aspose.pdf.internal.l99t.lk.lI(Unknown Source) at com.aspose.pdf.internal.l99t.lk.lI(Unknown Source) at com.aspose.pdf.internal.l0u.lh.lI(Unknown Source) at com.aspose.pdf.internal.l99t.lk.lf(Unknown Source) at com.aspose.pdf.internal.l99t.le.lk(Unknown Source) at com.aspose.pdf.internal.l15p.lv.lI(Unknown Source) at com.aspose.pdf.internal.l15p.lb.lf(Unknown Source) at com.aspose.pdf.internal.l15t.lj.lI(Unknown Source) at com.aspose.pdf.internal.l0j.lf.lI(Unknown Source) at com.aspose.pdf.l4j.lI(Unknown Source) at com.aspose.pdf.l4j.lI(Unknown Source) at com.aspose.pdf.ADocument.lj(Unknown Source) at com.aspose.pdf.ADocument.lI(Unknown Source) at com.aspose.pdf.Document.lI(Unknown Source) at com.aspose.pdf.ADocument.lI(Unknown Source) at com.aspose.pdf.ADocument.save(Unknown Source) at com.aspose.pdf.Document.save(Unknown Source) at org.jeecg.smallTools.TestStr.downloadFile2Local3(TestStr.java:316) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)