Docx from dynamic template Image

Certified Senior Developer

Hello guys, So I was trying to add image to the document (both dynamic and static) . I included the required image doc as constant in my XML. I got the id of the document in the generated document. Some discussions explain about bookmarks. I have tried that but still the same. It gets a bracket outside of the doc Id. So Any other possible solutions. Also I want some notes or any references or other new things in this plugin for my seminar. Thanks in Advance.

First image is the template. Second one is the xml code. Third one is the one I got so far.

  Discussion posts and replies are publicly visible

Parents
  • Hi there,

    The way that you have configured your template it is not correct, and there are few things that you will need to change in order to add an image in your DOCX, I'll try to add some steps here:

    • You don't need to have the document ID in your XML, as the document will be passed in a different parameter of the smart service (Images), check the screenshot below.
    • Inside your template you must to have an image as a place holder, it is to this image that you will add the link that contains the bookmark that you created
    • If you need the image to be conditional you can add a normal validation before the image, to check if the bookmark has content or not. Please check the screenshot below

    Regards,

    Acacio B

Reply
  • Hi there,

    The way that you have configured your template it is not correct, and there are few things that you will need to change in order to add an image in your DOCX, I'll try to add some steps here:

    • You don't need to have the document ID in your XML, as the document will be passed in a different parameter of the smart service (Images), check the screenshot below.
    • Inside your template you must to have an image as a place holder, it is to this image that you will add the link that contains the bookmark that you created
    • If you need the image to be conditional you can add a normal validation before the image, to check if the bookmark has content or not. Please check the screenshot below

    Regards,

    Acacio B

Children