Page 1 of 1

Preview is not updated correctly

PostPosted: Thu Apr 14, 2022 6:42 pm
by ThomasStueber
We use docx4j 8.3.1
I have problems with the preview in docx documents.
We use a document template containing content controls.
A document is created with MS Word (Office 2019) using this template.
Later the contents of some content controls are changed programatically with docx4j.
One content control is part of the "normal" text, two other content controls are in the footer.

If the document is opened in Word, it looks correct, but the preview is not updated correctly.
Only the content control in the text is updated, the content controls in the footer are not.

Update to docx4j 8.3.4 didn't solve the problem

Re: Preview is not updated correctly

PostPosted: Fri Apr 15, 2022 9:50 am
by jason
Just to clarify, when you say "preview" are you talking about the thumbnail you can choose to save by checking that box in Word's "save as" dialog, or something else?

Word seems to create an EMF image for that thumbnail, but would probably accept a png say.

You could create your own thumbnail by using docx4j-export-fo to make an image of the first page, then adding it with a rel of type http://schemas.openxmlformats.org/packa ... /thumbnail

but docx4j doesn't provide an api call to do it all for you.

ThomasStueber wrote:Only the content control in the text is updated, the content controls in the footer are not.


Perhaps you could expand on what you mean here, in another topic pls.