php7打印html表(条形码)到网络打印机

I'm new to PHP and searched for a solution, but nothing solved my problem. I use PHP Version 7.3.0 and so far, my code creates a barcode using tables. (there's more code above, this is just how the final output(what I want to print) gets generated)

$html="<table cellpadding=0 cellspacing=0><tr>"; 
for($x=0;$x<strlen($w);$x+=2) // code 128 widths: black border, then white space
$html .= "<td><div class=\"b128\" style=\"border-left-width:{$w[$x]};width:{$w[$x+1]}\"></div>"; 
return "$html<tr><td colspan=".strlen($w)." align=center><font family=arial size=2><b>$text</table>"; 

Example how the page looks like after the barcode creation:

Barcode

What I am looking for is a way how I can print this on a network printer. (static IP) Is there any possible way to do this without any other downloads? If not, what do I need for it to work in php7? Printing it on a label Printer is also possible if that is easier.

Thank you.