python-docx-template icon indicating copy to clipboard operation
python-docx-template copied to clipboard

Add a snippet to set the background color of a shape or page

Open KrYpTeD974 opened this issue 4 years ago • 0 comments

It would be really useful to set the background color of a shape, text box or a page. Just like {% cellbg 'color' %} for the tables.

As a use case, I would like to change the color of a text box that takes the full page width, after the docx template has been created.

The only solution I found is to define a one cell bordeless table that take the full page width, and use the {% cellbg %} snippet to change the color. But I think it's an ugly solution.

Addtionally, a user could want to dynamically change the background of a page as well.

KrYpTeD974 avatar Aug 30 '21 12:08 KrYpTeD974