Docx create shapes or dynamic fill color



  • Hello,

    I was wondering if there is a way to create shape or dynamically modify the color of a shape that is present in the template ? We've tried to change it directly in xml but we can't open the generated docx file.

    Any help is appreciated.

    Kind regards.


  • administrators

    hi!

    I was wondering if there is a way to create shape or dynamically modify the color of a shape that is present in the template ?

    There isn't a built-in way to do it. how are you modifying the XML directly? the XML of docx (and other office related XML) have to be well-formed, otherwise you get a broken document that can not open, so this is likely what is happening with your direct modifications.

    what shapes are you trying to modify? just that we get an idea if it is something we can easily support. perhaps you can share a docx with the shapes you plan to dynamically modify, and what modifications do you expect to make.



  • Hello,

    It's simply a long rectangle that we put in the header to have a color bar on all pages. And we would like to be able to change its color according to the data we pass.

    This is the color bar on the left

    0_1745320403720_upload-8a55b40f-955e-458c-be61-042aac7e4595


  • administrators

    @Aylarann ok, i have created a request to support this, you can subscribe here to get updates when there is progress about it.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.