error: “Cannot invoke “com.aspose.words.zzYs3.getFormatCode()” because the return value of “com.aspose.words.zzqI.zzYHQ()” is null”
when I try to convert this attached word to pdf the generation failembed testing (4).docx (52.9 KB)
@operationsdotbcs I cannot reproduce the problem using the latest 23.1 version of Aspose.Words for Java. I have used the following simple code for testing:
Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");
Hi, I updated the version of Aspose Words to version 23.2. As a result, I was able to successfully convert to PDF. However, the output is not identical to the original. I attached the word and the converted pdf
and this is the code:
0680600000PdOluAAF.pdf (185.3 KB)
embed chart.docx (52.9 KB)
String dataDir = Utils.getDataDir();
String filePath = dataDir.concat(fileId).concat(".").concat(extension);
Document doc = new Document(filePath);
dataDir = dataDir.concat(fileId.split("\\.")[0]).concat(".pdf");
PdfSaveOptions options = new PdfSaveOptions();
options.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);
FontSettings.getDefaultInstance()
.setFontsFolders(new String[] { FONTS_PATH, "/usr/share/fonts/" }, true);
doc.save(dataDir, options);
@operationsdotbcs
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-25128
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as WORDSNET-25128) have been fixed in this Aspose.Words for Java 23.8 update.