- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 06:50 AM - edited 05-03-2023 06:53 AM
Hello All,
I am generating word doc dynamically with some content and image, but image does not render. Any ideas or is there a work around for this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:13 AM
Hi @Raj40,
Follow the below steps:
1) Convert your image to base64 using CONVERT YOUR IMAGES TO BASE64
2) Create a system property with string type.
3) Store the base64 image code in it.
4) In widget server side scripts call system property as
data.yourImage = gs.getProperty("company.name.logo");
5) Use the data.yourImage variable in image tags as
body = body + '<img src="'+ c.data.yourImage + '" width="189" height="47"/>';
Thanks,
Sagar Pagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 08:56 AM
@Raj40 Looks like you need to write the base64 encoded form of the inline image within the word document. Here is a reference from the Microsoft to write an inline image within a word document https://learn.microsoft.com/en-us/javascript/api/word/word.inlinepicture?view=word-js-preview
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:13 AM
Hi @Raj40,
Follow the below steps:
1) Convert your image to base64 using CONVERT YOUR IMAGES TO BASE64
2) Create a system property with string type.
3) Store the base64 image code in it.
4) In widget server side scripts call system property as
data.yourImage = gs.getProperty("company.name.logo");
5) Use the data.yourImage variable in image tags as
body = body + '<img src="'+ c.data.yourImage + '" width="189" height="47"/>';
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 05:34 AM
can you please tell me the way to create a word document dynamically .