• Resolved krishs

    (@krishs)


    Dear Team,

    I’m using this plugin in one of my sites but while adding content inside I found that there is so much spacing on right and left sides. I’m attaching a screenshot link of invoice. I’ve checked all the CSS but nothing works. Please help me to solve this issue.

    thanks and regards.

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

    (@yordansoares)

    Hi @krishs,

    Unfortunately, the screenshot didn’t arrive, but I think you’re referring to the document margins, right?

    If so, please add this code snippet to your site:

    /**
     * Customize the invoice margins
     */
    add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles', 10, 2 );
    function wpo_wcpdf_custom_styles ( $document_type, $document ) {
    	if ( $document_type == 'invoice' ) {
    		?>
    		@page {
    			margin-top: 1cm;
    			margin-bottom: 4.5cm;
    			margin-left: 1cm; /* Default: 2cm */
    			margin-right: 1cm; /* Default: 2cm */
    		}
    		<?php
    	}
    }

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

    Let us know if it worked!

    Thread Starter krishs

    (@krishs)

    dear @yordansoares,

    you are right. i was talking about document margin and code given by you is working perfectly as i want. thanks for the help.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @krishs,

    I’m glad to know that it worked!

    If you don’t mind and have the time, do you think you could leave us a review?

    Thanks in advance and all the best with your store!

    Thread Starter krishs

    (@krishs)

    @yordansoares sure. Reviews Done.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘unable to remove Unnecessary padding in invoice’ is closed to new replies.