Custom filter for thermal printer
-
I wanted to print the pdf via thermal printer. Even though I put the following code lines into my functions php childe theme section, it still seems on a4 format.What am I supposed to do ?
Code goes to functions php child theme
add_filter( ‘wpo_wcpdf_paper_format’, ‘wcpdf_custom_mm_page_size’, 10, 2 );
function wcpdf_custom_mm_page_size($paper_format, $template_type) {
// change the values below
$width = 250; //mm!
$height = 300; //mm!//convert mm to points
$paper_format = array( 0, 0, ($width/25.4) * 72, ($height/25.4) * 72 );return $paper_format;
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom filter for thermal printer’ is closed to new replies.