python-docx-template
python-docx-template copied to clipboard
Add a snippet to set the background color of a shape or page
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.