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

    (@dwpriv)

    There’s a general guide here that you can use.

    If this doesn’t work for you, could you share the error you’re receiving?

    Thread Starter diegogomez

    (@diegogomez)

    Excellent!, thank you very much, the snippet to convert to millimeters worked for me.

    Now I just need to modify the margins, I found the “page class” in the CSS, but even though I modified it, it doesn’t seem to have an effect on the template

    @page {
    margin-top: 1cm;
    margin-bottom: 3cm;
    margin-left: 2cm;
    margin-right: 2cm;
    }


    How should I modify them, is there a snippet for this as well?

    • This reply was modified 9 months, 1 week ago by diegogomez.
    Plugin Contributor dwpriv

    (@dwpriv)

    You can try this snippet:

    /**
     * Adjust margins
     */
    /*add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
    	?>
    		@page {
    			margin-top: 1cm;
    			margin-bottom: 3cm;
    			margin-left: 2cm;
    			margin-right: 2cm;
    		}
    	<?php	
    }, 10 , 2 );
    Thread Starter diegogomez

    (@diegogomez)

    Thanks, if it works, everything is fine now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paper Size’ is closed to new replies.