Bad z-index on images after Word to HTML conversion

I found an issue where on some documents, images are given a z-index. I don’t know why that is necessary for documents. That said, the z-index the images are given is a very large negative number. z-index: -65533
Seems close to 64*1024

What does this do? It causes the HTML to have a big white space where the image should be. I see someone asked about this a year ago, but it was not resolved. I don’t think anyone concluded that the problem had to do with the z-index. Hopefully it now can be resolved.

Here is the previous incident:
Support on html to word conversion

In the meantime, I am putting a .replace(“z-index:”,“Xz-indexX:”) on my output. This will prevent the style from loading while giving me some forensics if someone reports a problem.




Unfortunately I don’t have the problematic word document. I’ll ask the client if they have it still.

Here are the HTML save options.

htmlSaveOptions.PrettyFormat = False
htmlSaveOptions.CssStyleSheetType = Aspose.Words.Saving.CssStyleSheetType.Inline
htmlSaveOptions.ExportMetafileAsRaster = True
htmlSaveOptions.ImagesFolder = imagePath
htmlSaveOptions.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.FirstSectionHeaderLastSectionFooter
htmlSaveOptions.Encoding = Encoding.UTF8

Hi Rick,


Thanks for your inquiry. Could you please also attach your input Word document (.doc/.rtf file) and output HTML file showing the undesired behaviour here for testing? I will investigate the issue on my side and provide you more information.

Best regards,