Hi @printplaygames,
You can change the page margins with a small code snippet:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
function wpo_wcpdf_custom_styles () {
?>
@page {
margin-top: 1cm;
margin-right: 1cm;
margin-bottom: 1cm;
margin-left: 1cm;
}
<?php
}
This code snippet should be placed in the functions.php of your child theme or with a plugin like Code Snippets. If you haven’t worked with code snippets or functions.php before please read this: How to use filters
Please note that these margins will apply to both invoice and packing slip. If you only want to change the invoice you will have to add some additional padding to your packing slip after reducing the page margins like this:
add_action( 'wpo_wcpdf_custom_styles', 'wpo_wcpdf_custom_styles' );
function wpo_wcpdf_custom_styles () {
?>
@page {
margin-top: 1cm;
margin-right: 1cm;
margin-bottom: 1cm;
margin-left: 1cm;
}
.packing-slip {
padding-top: 0cm;
padding-right: 1cm;
padding-bottom: 2cm;
padding-left: 1cm;
}
<?php
}
-
This reply was modified 5 years, 3 months ago by
kluver.