Harry42 Posted May 29, 2019 Share Posted May 29, 2019 Hi @all, is it possible to have a pagebreak after x products in the PDF for the invoice and delivery-slip? It doesn't matter here if it could be an override or something in the tpl's or in the core in /classes/pdf/. We are using 1.7.5.1 Best regards, Harry Link to comment Share on other sites More sharing options...
tuk66 Posted May 29, 2019 Share Posted May 29, 2019 Try to add <br pagebreak="true"/> into a PDF template. 1 Link to comment Share on other sites More sharing options...
Harry42 Posted May 29, 2019 Author Share Posted May 29, 2019 Yes it was easy with a counter like {assign var=anzahl value=8} {assign var=umbruch value=$anzahl} {assign var=zumbruch value=0} at the top of the invoice.product-tab.tpl or the delivery-slip.product-tab.tpl And right after {foreach $order_details as $order_detail} {$zumbruch = $zumbruch + 1} After the closing </tr> something like this to close the table and open the next table on the next page and get the table-header (here from the delivery-slip.product-tab.tpl): {if $zumbruch == $umbruch} {assign var=umbruch value=$umbruch + $anzahl} </tbody> </table> <br pagebreak="true" /> <table class="product" width="100%" cellpadding="4" cellspacing="0"> <thead> <tr> <th class="product header small" width="25%">{l s='Reference' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="65%">{l s='Product' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="10%">{l s='Qty' d='Shop.Pdf' pdf='true'}</th> </tr> </thead> <tbody> {/if} Best regards, Harry Quote Link to comment Share on other sites More sharing options...
Nickovitshj Posted May 5, 2021 Share Posted May 5, 2021 On 5/29/2019 at 3:30 PM, tuk66 said: Try to add <br pagebreak="true"/> into a PDF template. Solved it for me as well, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now