Hello,
We are running to the same issue:
enerate PDF error for file - 0689O00000BgZavQAF.docx The error- Cannot invoke "com.aspose.words.zzZcl.zzXgA()" because the return value of "com.aspose.words.zzYgw.zzXAV()" is null",
We got java word version 25.2.
When we have Korean language we get this error.
We found that if the sentence starts with Korean and align to Justify so we get this error.
If we fix it to Align Left , so it works.
Thanks
Ayelet
@AyeletB The problem is not reproducible on my side using the document attached in this thread. Could you please attach the problematic input document here for testing? We will check the issue and provide you more information.
Investigation- Not Worked.docx (26.6 KB)
Thanks for your response.
I’ve shared with you the file with the problem text.
Thanks
Ayelet
@AyeletB Thank you for additional information. The problem is not reproducible on my side. Could you please also provide simple code that causes the problem on your side?
private static void convertWordToPDF(FileData_v5 fileData, String fileSource, String fileDestinationPdf)
throws Exception {
Document doc = new Document(fileSource);
PdfSaveOptions options = new PdfSaveOptions();
options.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);
if (Boolean.TRUE.equals(fileData.getIsBookmarkMode())) {
options.getOutlineOptions().setHeadingsOutlineLevels(3);
options.getOutlineOptions().setCreateMissingOutlineLevels(true);
options.getOutlineOptions().setExpandedOutlineLevels(2);
}
doc.setWarningCallback(new WarningCallbackWords());
String state = fileData.getDocumentState();
if (END_STATES.stream().anyMatch(state::contains)) {
// Accept all track changes
doc.acceptAllRevisions();
// Clear all comments
NodeCollection comments = doc.getChildNodes(NodeType.COMMENT, true);
if (comments != null) {
comments.clear();
}
}
// Save the document in PDF format.
doc.save(fileDestinationPdf, options);
}
@AyeletB Thank you for additional information. Unfortunately, the problem is still not reproducible on my side using the latest 25.5 version of Aspose.Words for Java. Please try using the latest version and let us know if the problem still persists on your side.
Hello
We have updated the version and it works !!
Thanks
Ayelet
1 Like