Skip to content

Instantly share code, notes, and snippets.

@wpweb101
Created September 28, 2015 12:29
Show Gist options
  • Select an option

  • Save wpweb101/60b31a26ae6601a36dbb to your computer and use it in GitHub Desktop.

Select an option

Save wpweb101/60b31a26ae6601a36dbb to your computer and use it in GitHub Desktop.
woocommerce pdf voucher - Modify PDF size and Font
<?php
// For Modify Existing PDF size and font size
function woo_vou_modify_existing_pdf_sizes( $pdf_sizes = array() ) {
//modify a4 pdf width
$pdf_sizes['A4']['width'] = 500;
//modify a4 pdf height
$pdf_sizes['A4']['height'] = 500;
//modify a4 pdf font size
$pdf_sizes['A4']['fontsize'] = 50;
return $pdf_sizes;
}
add_filter( 'woo_vou_get_pdf_sizes', 'woo_vou_modify_existing_pdf_sizes' );
@wpweb101
Copy link
Author

Note: The PDF height and width should be in mm ( millimeter )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment