Problem in converting docx file to pdf (containing an embedded image in docx)

Hi


Unable to convert docx file to pdf containing an embedded image in docx file.
Image is not getting loaded into the pdf generated file.

Below mentioned is the code which we are currently using to load image and to save pdf.

LoadOptions loadOptions = new LoadOptions();
loadOptions.setBaseUri(pdfInDir);
FileInputStream stream = new FileInputStream(inWordFileName);
Document doc = new Document(stream, loadOptions);
PdfSaveOptions pdfOptions = new PdfSaveOptions();
pdfOptions.setPrettyFormat(true);
pdfOptions.setEmbedFullFonts(true);
pdfOptions.setPreserveFormFields(true);
pdfOptions.setTextCompression(0);
doc.save(pdfOutDir + outPdfFileName+ “.pdf”, pdfOptions);
Please refer the attached docx file and converted pdf file.

Note: Using aspose.words.jdk16-7.0.0.jar
aspose-pdf-2.9.0-jdk16.jar
Thanks,
Sudha.

Hi Sudha,


Thanks for your inquiry. After an initial test with Aspose.Words for Java 16.12.0, we were unable to reproduce this issue on our end (see attached PDF output).

We would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:

Best regards,
Hi Awais Hafeez,

Thanks it is working.

Thanks,
Sudha.