Page 1 of 1

Roundtrip converting Docx to html and back again

PostPosted: Mon Jul 18, 2016 5:56 pm
by gizwhu
Hi,

I am convertng docx to html and back to docx. There are some formatting that are lost.

I have an image in the header of the docx. When it goes through the round trip, the image is lost.

Interestingly, the image in the header is correctly formed in the final docx if i manually edit the document and save it before going through the round trip.

Any help or suggestion is greatly appreciated.

Re: Roundtrip converting Docx to html and back again

PostPosted: Fri Jul 22, 2016 7:26 pm
by jason
Are you using https://github.com/plutext/docx-html-editor

gizwhu wrote:Interestingly, the image in the header is correctly formed in the final docx if i manually edit the document and save it before going through the round trip.


You mean edit in Word?

Does that change the image type? To answer this question, unzip the "before" and "after" docx files then look at the image in the header rels.

Re: Roundtrip converting Docx to html and back again

PostPosted: Tue Jul 26, 2016 10:18 pm
by gizwhu
Yes. Im using that library

Yes. I edit the document in microsoft word and open it in the editor and the image is there.

I cant pinpoint the actual problem and have attached a sample document for your reference.

Re: Roundtrip converting Docx to html and back again

PostPosted: Wed Jul 27, 2016 9:31 pm
by gizwhu
Hi,

I find that if I uncheck "Different on First Page" in header properties, the document is converted correctly. I have attached documents for your reference. Any advice is appreciated.