[Tutorial] Creating print formats

Your guide to creating print formats!

5 Likes

Good attempt. Just would like to suggest below :

  1. You should name sections as Header, Body and Footer.
  2. TBody tag should open and close in middle section.

Thank you for the valuable feedback! I will change the names accordingly for better understanding.
And I kept the opening and closing of tbody in above and below sections to reduce the number of lines of code; it can easily be moved to the middle section :slight_smile:

Will modify and add more features once I get some free time.
Thank you once again! :smiley:

Thanks for sharing. What are these empty if-statements for?

{% if pr[-1] %} {% endif %} 
{% if pr.append( pr[-1] + 1 ) %}{% endif %}

You’re welcome! :smiley:

It is to overcome a limitation of Jinja’s scope issue. Directly setting them threw error, so I had to do this as a work around for adjusting the value.

Can we achieve different header for first page, and different footer in the last page?

Yes, it is achievable. If you create a detailed issue on GitHub, I’ll add it to the readme on next update.