Update: We just found the holy grail for better prints.
Split Print Format table automatically into pages based on rendered size.
Using our custom app’s jinja function, we are now able to split the table rows according to a given “max-size” per page, taking print format styles into account. You just pass the whole table html and will get a paginated version back. Easy as that.
We’re still finishing everything up and are planning to make it public. Might be our contribution to the frappe community
hi, I am waiting for your solution
Will it include difference in the cell height in PDF and print too? If I use PDF button the cell height is very high, with bigger font
Update: We’re on track and able to release a first beta version by mid/end of February. After discovering an even better solution, we switched over and got a pretty awesome app now with lots of improvements over the standard print formats.
Quick update for all those waiting, as the first beta will be delayed a little: In favor of stability & reliability, we replaced one underlying library with a custom-made. This will delay the first beta to approx. mid of April, but will add further simplicity as well.
So… good things take time.
Hi @Maharshi_Patel
Thank you, great news for all users of Print designer and it’s future (which is definitelly very promising) .
Our solution will provide a different, more Jinja oriented approach:
Free control over content with jinja and full html/css support
Printpreview 1:1 identical look to the final PDF (preview is rendered clientside, therefore more performant)
Dynamic header/footer
Custom page formats
I know Print Designer does fullfill a lot of those needs, but still not all. This was the initial reason for our custom app. However, I’d love to see them implemented in Print Designer too in the future
@neocode what i shared is new pdf generation backend for frappe ( not limited to print_designer ). It’s uses Chrome headless rendering. i shared this as you earlier mentioned it in the post. Thank you.
We’ll keep going to make frappe_betterprint even better to it’s first release. Keeping you updated. (One might as well give the repo a star and watch for releases on Github)
It does support repeating page footer/header with dynamic content (Add different text on page 1, 2).
In the future, you will have page ranges…which will allow you to specify different footer styles (& height) for all pages following the definition within the content.
However, addressing the last footer specific is a hard thing by design: If there’s not enough space for the footer, the footer has to be on the next page… but then, there will be a lot of empty space on the last and second last page.
Other solutions which will be possible with Frappe Betterprint:
Add a new page range (e.g. “last-page”) → this will create a (optional) page-break and allow to set a new layout (different footer height) for all following pages.
Keep all footer the same height and just add a completely different footer content to the last page (absolutely possible).
Hacky, but working: You can add your last footer content at the end of the page content and align it to the bottom (margin-top: auto; or align-self: flex-end;). Please note, this will only align it above the footer → it’s recommended to set the footer height to 0.