• I’m having an issue with rendering PDF’s.
    I’m using the Extra Product Options plugin and have a lot of options for my product. When a product has 12 or less Extra Product Options, the PDF renders correctly.

    When the number of EPO options increases past 12, the EPO content reflows/splits incorrectly into a 2-page PDF. The header is visible on the first page and then the rest of the page is blank. The second page shows the product and the options.

    Multiple products and multi-page invoices work correctly when the EPO option count is reduced.

    Claude asks: Does the PDF engine have a known limitation with HTML tables, nested elements, or page-break handling in EPO-generated content?

    Is this fixable?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor dwpriv

    (@dwpriv)

    Hi @tnrkitty

    If the extra product information extends the height of the rows they appear in, they would naturally cause the rest of the items to go onto another page. However, if this only happens when there are 12 or more items, there may be something else happening. Could you share a screenshot of these PDFs, please?

    Thread Starter tnrkitty

    (@tnrkitty)

    Thread Starter tnrkitty

    (@tnrkitty)

    Does this on invoice or packing slip.

    Plugin Contributor dwpriv

    (@dwpriv)

    Thanks for that. It adds the page break because the row got so wide that it wouldn’t fit on the first page. You can try decreasing the height of the footer via PDF Invoices > General > Footer height and see how that works. Alternatively, you can try adding this code snippet to avoid a page break

    /**

     * WP Overnight PDF Invoices & Packing Slips

     */

    add_action( 'wpo_wcpdf_custom_styles', 'custom_wpo_wcpdf_custom_styles', 10 , 2 );

    function custom_wpo_wcpdf_custom_styles( $document_type, $document ) {

        if ( $order = $document->order ) {

            ?>

            .order-details tr {

                page-break-after: avoid;

            }

            <?php

        }

    }
    Thread Starter tnrkitty

    (@tnrkitty)

    I was unable to find a footer height setting. I have a logo height setting and changing that didn’t fix it. The code snippet didn’t work either.

    I was hoping to mainly use this plugin for offline orders and the empty page problem isn’t critical for that. But I also wanted to send an invoice to my customers too, but I’m afraid they’ll not scroll down further on the invoice and just assume the order had not completed or had an error. Thank you for the help.

    Plugin Contributor dwpriv

    (@dwpriv)

    The footer height should be in the “Shop information” tab on the General settings page of the plugin. Alternatively, you can also try hiding the footer by replacing the above snippet with this one

    /**

     * WP Overnight PDF Invoices & Packing Slips

     */

    add_action( 'wpo_wcpdf_custom_styles', 'custom_wpo_wcpdf_custom_styles', 10 , 2 );

    function custom_wpo_wcpdf_custom_styles( $document_type, $document ) {

        if ( $order = $document->order ) {

            ?>

            #footer {

                Display: none;

            }

            <?php

        }

    }
    Thread Starter tnrkitty

    (@tnrkitty)

    That snippet didn’t change anything either. I’m still unable to find a Footer height setting. In the “Shop information” tab the only option that’s close is a text box “Footer: terms & conditions, policies, etc.”

    Plugin Contributor dwpriv

    (@dwpriv)

    The footer height is my mistake, actually. It is only available in our Premium Templates extension and not in the free version. My apologies for the confusion.

    Can you share an HTML version of the invoice, please? You can use this guide to open it in HTML mode, then right click the page and save it and then send it to us.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.