phpc.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A server for PHP programmers & friends. Join us for discussions on the PHP programming language, frameworks, packages, tools, open source, tech, life, and more.

Administered by:

Server stats:

840
active users

🧵Currently optimizing the PDFs of
6. Our customer Kinowerbung.de has lot's of line items with sub-items. Interestingly 's default behaviour of automatic page breaks in tables with repeating table headings is not used 🤔
@ShopwareDevs

To encounter memory issues we already removed the repeating logo earlier on. We now optimized the structure, removed the repeating letter head and some other elements our customer did not want on every page.

But this does not remove the superfluous whitespace.

Because Shopware uses it's own logic to create page breaks, the number of line items is the same for every page. But we now have more space on all pages after the first one. The way the templates and blocks are built prevents us to customize this calculation.

So we tried using a very high line item count per page to trigger the automatic page break in the table.

To repeat some parts which should appear on every page, we moved them to the table head and applied the needed styling. So this is our currently final result.

As you can see, the document pages look way cleaner, can fit more content and it's still obvious which offer a page belongs to. If there's enough interest in details how this can be achieved, I may write a blogpost about it.

Daniel Gehn

✍️ Blogpost is in the works and will hopefully be done soon. 👀