I’m trying to convert a word document to a msg file but I’m running into problems with images and abolute and relative positions.
As a test I’ve made a word document (which is included) which has some shapes (which will be handled as image) added in the document and a table just to see how the placement is done.
When saving it to a html document everything goes fine. I’m using the normal html save formate because fixedhtml seems to cause even more problems.
I use the following saveoptions (I use php and the php/javabridge):
$saveoptions = new Java(“com.aspose.words.HtmlSaveOptions”);
$headerfootermodes = new Java(“com.aspose.words.ExportHeadersFootersMode”);
$htmlelementsizeoutputmode = new Java(“com.aspose.words.HtmlElementSizeOutputMode”);
$saveoptions->setExportImagesAsBase64(true);
$saveoptions->setExportHeadersFooters(false);
$saveoptions->setExportHeadersFootersMode($headerfootermodes->NONE);
$saveoptions->setExportFontResources(false);
$saveoptions->setPrettyFormat(true);
$saveoptions->setTableWidthOutputMode($htmlelementsizeoutputmode->ALL);
Now when I try to load the document as a msg file from html it goes okay but for some reason the alignment of the images is changed compared to the generated html document. From what I can see the problem lies mostly in image which are aligned to the paragraph but I’m not 100% sure.
Now when I try to load the document as a msg file from html it goes okay but for some reason the alignment of the images is changed compared to the generated html document. From what I can see the problem lies mostly in image which are aligned to the paragraph but I’m not 100% sure.
Inlcuded are the word document I used, the generated html document and the generated msg document.
Could you tell me what I’m doing wrong or how I can get the images to show up at the right place?
Could you tell me what I’m doing wrong or how I can get the images to show up at the right place?