• Resolved mikeexx

    (@mikeexx)


    Hello,
    I have this function from one of you support thread to change the font-size of data from PDF invoice.

    add_action( ‘wpo_wcpdf_custom_styles’, function ( $document_type, $document ) {
    ?>
    /* Document label / h1 { font-size: 16pt; } / Shop name and other labels / h3, h4 { font-size: 9pt; } / Document body and order table */
    body {
    font-size: 9pt;
    }
    dt, dd, dd p, .wc-item-meta {
    font-size: 9pt;
    }
    <?php
    }, 10, 2 );

    However, this style dt, dd, dd p, .wc-item-meta is no longer working, can you please tell me how I can able to change the font style of the SKU from the PDF invoice? Here is a screenshot for reference: https://app.screencast.com/A2W237qVQXHD7

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @mikeexx,

    We have applied some improvements recently to our default Simple template, to make it compatible with the mPDF extension (see PR#810), that is why the CSS rule for the item meta does no longer work with that specific selectors.

    That said, here is an updated version of that code snippet that should work (replace the default values with your desired ones!):

    /**
    * PDF Invoices & Packing Slip for WooCommerce:
    * Add custom styles to the PDF documents
    */
    add_action( 'wpo_wcpdf_custom_styles', function ( $document_type, $document ) {
    ?>
    /* Document label */
    h1 {
    font-size: 16pt;
    }
    /* Shop name and other labels */
    h3, h4 {
    font-size: 9pt;
    }
    /* Document body and order table */
    body {
    font-size: 9pt;
    }
    .item-meta {
    font-size: 7pt;
    }
    <?php
    }, 10, 2 );

    Let me know if you need more help!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.