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.