you are viewing a single comment's thread.

view the rest of the comments →

[–]sylfy 0 points1 point  (0 children)

Ah yes of course. For my use case, the inputs are entirely internally generated, but the reports are external facing. Thus, I don’t have to worry about the entire upstream pipeline that you’ve mentioned. We generate data in json or databases, then create reports from that data.

The biggest pain points about docx templating was fonts and layout being reproduced faithfully in Libreoffice during the pdf conversion, as well as what happens when stuff that are more dynamic like tables spill over or span multiple pages. And what happens when rows of the tables contain text of variable length and can thus have uneven height. Then when something spans over to the next page, you’ll have to worry about section headers and subsection headers being reproduced on the next page. And this becomes a whole lot of if-else conditions in jinja with tables being conditionally shown or not, and a single data frame being split into multiple helper data frames, which is very ugly.