Support » Plugin: PDF Invoices & Packing Slips for WooCommerce » How to fix page-break-inside?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Thomas,
    I think this is an issue with the printer rather than the PDF.
    If I understand correctly, you want to print on a continuous roll. The problem is that if you export to PDF to A4 or Letter (or whatever format you are using), and the PDF needs to split data between the pages somehow.

    Now you can prevent the header from being repeated by removing the <thead> element, and move those <th> elements to the <tbody>.

    The waste space on the top headers is something you should fix yourself. because if you use the simple template out of the box, it doesn’t have that margin (the default top margin is only 1cm).

    Good luck!

    Thread Starter thomas911

    (@thomas911)

    Hi, Ewout

    Thank for reply, I have tested on ms word with no error.
    Just fix “Page print out auto page-break” correct.
    Could you please give me any advises to fix the first question.

    Export correct but print out will breaking header

    http://postimg.org/image/njckpbc6x/

    Best regards,

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Thomas,
    I’m not sure I understand correctly, if I look at your last image, I don’t see the waste space anymore… Can you zip your template folder and send it to support@wpovernight.com?

    Thanks!
    Ewout

    Thread Starter thomas911

    (@thomas911)

    Done.

    Could you please help me show total items in order?

    Ex: 2 black , 2 blue
    Total items: 4 items

    Thanks Ewout!

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Thomas,
    I never received anything, did you send it to the correct address?
    You can calculate the total number of items by putting something like:

    <?php
    $total_quantity = isset($total_quantity)?$total_quantity+$item['quantity']:$item['quantity'];
    ?>

    in the items loop, and then after the loop print that quantity:

    Total items:<?php echo $total_quantity; ?>

    Ewout

    p.s. it would help if you could post the resulting pdf or higher quality images rather than tiny thumbnails!

    Thread Starter thomas911

    (@thomas911)

    Hi, Ewout

    I have fixed print out, many thank your help.

    I have try your lastest code but no luck, just show only 1 item 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to fix page-break-inside?’ is closed to new replies.