Landray RDM EKP-22232 Convert Effect

words source code:
src.zip (4.8 KB)

origin doc:
20250927 15.6寸触摸屏维修 .docx.zip (25.5 KB)

error converted:

Caused by:java.lang.NullPointerException com.aspose.words.zzwc.zzXTb(Unknown Source) 
com.aspose.words.zzWzX$zzWod.zzi4(Unknown Source) 
com.aspose.words.zzWzX.zzY0k(Unknown Source) com.aspose.words.zzWzX.zzY8T(Unknown Source) 
com.aspose.words.zzXKn.zzi4(Unknown Source) com.aspose.words.zzXKn.zz1P(Unknown Source) 
com.aspose.words.zzFa.zzi4(Unknown Source) com.aspose.words.zzFa.zzF1(Unknown Source) 
com.aspose.words.zzX4z.zzi4(Unknown Source) com.aspose.words.zzX4z.zzYqr(Unknown Source) 
com.aspose.words.zzX4z.zzWod(Unknown Source) com.aspose.words.zzW4j.zzVUW(Unknown Source) 
com.aspose.words.zzW4j.zzWod(Unknown Source) com.aspose.words.zzQ9.zzJR(Unknown Source) 
com.aspose.words.zzQ9.zzYqr(Unknown Source) com.aspose.words.zzQ9.zzi4(Unknown Source) 
com.aspose.words.zzX6e.zzi4(Unknown Source) com.aspose.words.zzX6e.zzZqK(Unknown Source) 
com.aspose.words.zzZnj$zzi4.zzYUp(Unknown Source) com.aspose.words.zzq2.zzYUp(Unknown Source) 
com.aspose.words.zzZnj.zzWfk(Unknown Source) com.aspose.words.zzZnj.zzWnz(Unknown Source) 
com.aspose.words.zzMF.zzYUp(Unknown Source) com.aspose.words.zzq2.zzYUp(Unknown Source) 
com.aspose.words.zzYSF.zzWod(Unknown Source) com.aspose.words.zzVSX.zzZqK(Unknown Source) 
com.aspose.words.zzOe.zzX8f(Unknown Source) 
com.aspose.words.Document.updatePageLayout(Unknown Source) 
com.aspose.words.Document.zzXBF(Unknown Source) 
com.aspose.words.Document.getPageCount(Unknown Source)

Please have a check.

@hucq_landray_com_cn

It appears you are encountering a NullPointerException while attempting to convert a document using Aspose.Words. This error typically indicates that there is an attempt to use an object reference that has not been initialized.

To troubleshoot this issue, consider the following steps:

  1. Check Document Integrity: Ensure that the source document (20250927 15.6寸触摸屏维修.docx) is not corrupted. Open it in Microsoft Word to verify its integrity.

  2. Update Aspose.Words: Ensure you are using the latest version of Aspose.Words, as updates often include important bug fixes and enhancements.

  3. Review Code: If you have custom code for the conversion, carefully review it for any potential null references. Make sure that all objects are properly initialized before use.

  4. Simplify the Document: If feasible, try converting a simpler version of the document to isolate the issue. This can help determine if specific content is causing the problem.

  5. Consult Documentation: For more detailed guidance, refer to the Aspose.Words documentation regarding document conversions and exception handling.

If the problem persists, consider sharing a minimal reproducible example on the Aspose forums for further assistance.

@hucq_landray_com_cn As I can see, you are using some old version of Aspose.Words. I tested your scenario with the latest 25.9 version of Aspose.Words for Java and the problem is not reproducible. So please try using the latest version and let us know if the problem still persists.

I used 25.6 version,it’s not too old.

@hucq_landray_com_cn According to the API used in your code the version is much older than 25.6. For example the following code:

saveOptions.setPageIndex(i - 1);
saveOptions.setPageCount(1);

FixedPageSaveOptions.PageIndex and FixedPageSaveOptions.PageCount properties has been deprecated a while ago. Per WORDSNET-20820 in 20.10 version we have introduced FixedPageSaveOptions.PageSet property and marked the above mentioned two properties as obsolete. In 21.1 version these properties has been removed.

sorry,this is my new demo,still has problem.
src 2.zip (14.9 KB)

@hucq_landray_com_cn Still the problem is not reproducible on my side using the latest 25.9 version of Aspose.Words.