Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
979 views
in Technique[技术] by (71.8m points)

ms word - Saving docx as a filtered HTML flattens some images to a height of 1

I've inherited a build system that uses chmProcessor to convert a docx file to a chm file. Not ideal obviously, and I plan to replace it in the future, but for the immediate future I'm stuck with it.

chmProcessor starts by using Word to resave the docx as a filtered html file. In the file there's a warning icon that's used extensively. For some reason when converting the file to html this icon is changed to have a height of 1 about halfway through. In the html it's explicitly given a height of 1 pixel, and it's also saving a second copy of the image that is only 1 pixel high.

I've tried replacing it at that point with a different identical image and a completely different image to no effect. I've even converted it into html, updated the html to use the correct image with the correct height and converted it back into a docx. When I convert it into html again the image is flattened again.

Deleting different sections of the document only moves the problem later in the file, and it doesn't seem to matter which bits I delete.

There's obviously some subtlety in the docx that is causing this but I honestly have no idea what. Any thoughts?

question from:https://stackoverflow.com/questions/65898389/saving-docx-as-a-filtered-html-flattens-some-images-to-a-height-of-1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...