192
Views
4
Comments
[OfficeUtils] Image inside word template doesnt work
Question
officeutils
Service icon
Forge asset by you

Hi,


The component works great, can replace placeholder with a text or image etc.


However, seems like when I have images inside the Template document, it always return corrupted after process, regardless how I place that images the word template.
It has no issues when I used the action to put that image in the placeholder.

Thing is our template is customisable on run-time, so user might add/move/change some image inside the template document. Somehow always have issue when we had image added inside the template.

Any Idea?

2016-10-14 14-44-44
Elena Novozhilova

Wisnu Aji wrote:

Hi Bruno/Elena,


The component works great, can replace placeholder with a text or image etc.


However, seems like when I have images inside the Template document, it always return corrupted after process, regardless how I place that images the word template.
It has no issues when I used the action to put that image in the placeholder.

Thing is our template is customisable on run-time, so user might add/move/change some image inside the template document. Somehow always have issue when we had image added inside the template.

Any Idea?

Hi Wisnu, 

Can you please send me the document with image that get corrupted, so I can check what is going on?

Best regards, 

Elena.


2023-11-30 03-54-00
Purnomo Wisnu Aji

Hi Elena,

Attached is a sample, some we have on header, some we have inside the content.
Somehow it could not open in my Office Word after process. 

Regards,

Aji

Test2.docx
2023-11-30 03-54-00
Purnomo Wisnu Aji

Hi Elena,

Found the work around.
Its related with how I anchor the Images.
Not sure in Ms. Office but in Libre Office I just anchor it as character, It works regardless where I put image (paragraph, header, table etc).

Hope this will help you to add necessary code to handle those anchor issues.


Regards,

Aji


2024-01-18 12-42-28
Bogdan Boglea

Hey Aji,


Did you find a way of solving this problem using MS Office? I have the same problem, where we are using a pre-defined template and we just replace parts of it with data from our application/database, but the rest should remain as it is and can be configured by the users further on.

So I have some images (some in header, some not) but not sure how to change their anchor property so that the output file won't be corrupt.


Regards,

Bogdan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.