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

Unwanted empty paragraph before and after every table in a loop.

Open SergeyZaykov opened this issue 2 months ago • 5 comments

Describe your problem

I want to create a multi-page document that contains only tables. Each page must be completely filled with one table.

Thus, a result document should contain only tables and page breaks because any paragraph breaks the page layout.

In a rendered document I have one unwanted empty paragraph before and after every table.

In addition

Any attempts to use a minus sign inside {%%} just created an unreadable document.

Provide a test case

My template document is attached. for i in range tables.docx

Screenshots

What I want. Image What I got. Image

SergeyZaykov avatar Oct 31 '25 07:10 SergeyZaykov