Hi,
We are using Aspose.PDF to generate both PDF and Docx files. Files are being generated all good and as per requirement and images appearing in docx fine. But we are having issue for images missing in Docx files if kept in OneDrive synced directory or if we use Office365 on mac.
Aspose.PDF version used: 22.8.0; also tried 22.9.0 but of no use
Images appearing fine:
image.png (25.4 KB)
Images not appearing, when moved or saved to onedrive folder:
image.png (4.0 KB)
Here is sample code we are using with basic html with text and image only:
var loadOptions = new Aspose.Pdf.HtmlLoadOptions();
var document = new Aspose.Pdf.Document(new MemoryStream(Encoding.UTF8.GetBytes(samplehtml)), loadOptions);;
document.Save(outputFilePath, Aspose.Pdf.SaveFormat.DocX);
Code sample in Zip:
sample_code.zip (2.1 KB)
We are also using a purchased license for Aspose.PDF
We know that there are other Aspose products for generating docx like Aspose.Words and Aspose.Html and that may not having this issue, but those did not fulfill our requirment to fully support Html and CSS content as supported by Aspose.PDF.
Most importantly, as we checked the mime type of generated file, that is āapplication/zipā instead of āapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentā. We tried everything to have required ContentType in file, but no success.
We will be very grateful to have any solution or help.
Thanks