Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mask666

    (@mask666)

    *sorry for those typos

    Hello,

    We’re experiencing an issue with the footer setup with the free version of the plugin which our “T&C” has been cut:
    https://drive.google.com/file/d/1_pRYjkRv5-u3sBalXh33p6oE3mAzTDHy/

    Found this issue raised by others but I saw there were?2 valid solutions and not sure which one should I go with.
    https://www.ads-software.com/support/topic/text-on-footer-of-invoice-is-cut/

    Thanks so much and have a nice day.`

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @mask666,

    You may try this version of the second one:

    /**
     * WooCommerce PDF Invoices & Packing Slips
     * Set a custom height for the footer
     */
    add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
    	$footer_height = 3; // Set your footer height here!
    	$page_margin_bottom = $footer_height + 1;
    	?>
    	#footer {
    		bottom: -<?php echo $footer_height; ?>cm;
    		height: <?php echo $footer_height; ?>cm;
    	}
    	@page {
    		margin-bottom: <?php echo $page_margin_bottom; ?>cm;
    	}
    	<?php
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Just change the 3 for a higher value, within the $footer_height variable, if it’s not enough.

    Let me know if it worked!

    Thread Starter mask666

    (@mask666)

    Hello @yordansoares,

    Thanks so much for the quick response and code enhancement, the snippet works perfectly!

    One more question, is there a way to put the content in the footer left aligned?

    Thanks again.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Yes, it is! Just replace my previous code snippet with this one:

    /**
     * WooCommerce PDF Invoices & Packing Slips
     * Set a custom height for the footer and align it to the left
     */
    add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
    	$footer_height = 3; // Set your footer height here!
    	$page_margin_bottom = $footer_height + 1;
    	?>
    	#footer {
    		bottom: -<?php echo $footer_height; ?>cm;
    		height: <?php echo $footer_height; ?>cm;
    		text-align: left;
    	}
    	@page {
    		margin-bottom: <?php echo $page_margin_bottom; ?>cm;
    	}
    	<?php
    }, 10, 2 );

    I have added the text-align: left property to the #footer selector to do it.

    Thread Starter mask666

    (@mask666)

    Hello @yordansoares,

    It works brilliantly!
    Thanks again for the quick response and effort. With full of great people like you, this plugin is easily worth more than a 5-star review.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Text on footer of PDF invoice has been cut’ is closed to new replies.