Hi,
I’m trying to convert an HTML document to a Word document. It seems that the images are converted to the wrong resolution. Here’s an example.
What happens is that the image gets shrunken to 720 wide x 540 tall. If you do a “Save as Picture” in Word, you can see that resolution. But then Word scales it back up to 960 x 720 in the document, and it just looks a little fuzzy.
Is there some setting that we’re missing to convert things correctly?
Here’s our Java code:
Document doc;
License license = new License();
license.setLicense(ClassLoader.getSystemResourceAsStream("Aspose.Words.lic"));
LoadOptions loadOptions = new LoadOptions();
loadOptions.setBaseUri(urlToSource);
loadOptions.setEncoding(Charset.forName("UTF-8"));
if (htmlDocumentPath != null) {
doc = new Document(new FileInputStream(new File(htmlDocumentPath)), loadOptions);
} else {
doc = new Document(ClassLoader.getSystemResourceAsStream("audit_report.html"), loadOptions);
}
if (outputPath != null) {
doc.save(outputPath + "/AuditReport.docx", SaveFormat.DOCX);
return "Saving Document to " + outputPath + "/AuditReport.docx";
} else {
doc.save("./AuditReport.docx", SaveFormat.DOCX);
return "Saving Document to AuditReport.docx";
}