Free Support Forum - aspose.com

DOCX to PDF conversion thows ArrayIndexOutOfBoundsException using Java

Easily to reproduce, got the following error:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at com.aspose.words.zzYU5.zzZ(Unknown Source)
at com.aspose.words.zzYU6.zzZ(Unknown Source)
at com.aspose.words.zzZKZ.zzlQ(Unknown Source)
at com.aspose.words.zzZKZ.zzY(Unknown Source)
at com.aspose.words.zzZKZ.zzVg(Unknown Source)
at com.aspose.words.zzZKT.zzZ(Unknown Source)
at com.aspose.words.zzZKT.zzM(Unknown Source)
at com.aspose.words.zzZL2.zzF(Unknown Source)
at com.aspose.words.zzZL1.zzA(Unknown Source)
at com.aspose.words.zzZL1.zzT(Unknown Source)
at com.aspose.words.zzZL1.zzU(Unknown Source)
at com.aspose.words.zzW2.zzY(Unknown Source)
at com.aspose.words.zzW2.zzZ(Unknown Source)
at com.aspose.words.zzYXS.zzYOC(Unknown Source)
at com.aspose.words.zzYXS.zzY(Unknown Source)
at com.aspose.words.zzYXS.zzZ(Unknown Source)
at com.aspose.words.zzXN.zzjb(Unknown Source)
at com.aspose.words.zzXN.zzW(Unknown Source)
at com.aspose.words.zzXN.zzX(Unknown Source)
at com.aspose.words.zzZ6V.zzG(Unknown Source)
at com.aspose.words.zzZ6V.zzH(Unknown Source)
at com.aspose.words.zzZ6V.zzZ3h(Unknown Source)
at com.aspose.words.zzZ6V.zzO(Unknown Source)
at com.aspose.words.zzZ69.zzF(Unknown Source)
at com.aspose.words.zzYVV.zzb(Unknown Source)
at com.aspose.words.zz90.zzF(Unknown Source)
at com.aspose.words.zz91.zzZOF(Unknown Source)
at com.aspose.words.zzZ74.zzZ3D(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at com.aspose.words.Document.zzX9(Unknown Source)
at com.aspose.words.Document.getPageCount(Unknown Source)
at com.aspose.words.zz0C.zzY(Unknown Source)
at com.aspose.words.zz0C.zzZ(Unknown Source)
at com.aspose.words.zzZGI.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)

code:
File docxFile — input File
Document doc = new Document(docxFile.getAbsolutePath());
doc.setWarningCallback(new WarningCallback(docxFile));
final PdfSaveOptions saveOptions = new PdfSaveOptions();
doc.save(converted.getAbsolutePath(), saveOptions);

Thanks for help!

obfuscated5.zip (1.6 MB)

@ruhongcai

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-19833 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.