• Resolved Bob the web builder

    (@yourlive)


    I’m making a custom PDF invoice template but can’t seem to get padding in the order items table. I’ve tried adding padding to the shortcode like below, or targeting the class in the styling section, but without any result.

    [wcj_order_items_table table_class=”pdf_invoice_items_table” columns=”item_name|item_subtotal_tax_incl|item_subtotal_tax_excl|item_quantity|line_total_tax_excl” columns_styles=”width:40%;|width:15%;|width:15%;|width:15%|width:15%;text-align:center;padding:20px;background:#EDF2ED;”]

Viewing 1 replies (of 1 total)
  • Plugin Contributor David G

    (@gravid7)

    Hi @yourlive,

    You can add the custom CSS in the PDF Invoicing & Packing Slips > Styling section. Please note that standard padding will not work in PDF generation due to engine limitations.

    Instead, you can use line-height to achieve the vertical spacing you’re looking for. Please use the CSS below:

    .pdf_invoice_items_table th {
    font-weight: bold;
    border: 1px solid #F0F0F0;
    line-height: 3; /* This creates vertical space/padding */
    background-color: #EDF2ED;
    }

    .pdf_invoice_items_table td {
    border: 1px solid #F0F0F0;
    line-height: 3; /* This creates vertical space/padding */
    }

    By increasing the line-height, you effectively force the cell height to expand, giving the appearance of padding.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.