1
I’m having trouble putting together layout for printing on Elgin i9
, mount the script on laravel 5.4
thus:
$produto = Produto::find($request->input('COD_IDENT_PRODU'));
$qtd = $request->input('QTD_IDENT_PRODU');
$cod = $produto->COD_BARRA_PRODU;
$d = new DNS1D();
$d->setStorPath(__DIR__."/cache/");
$codigo = $d->getBarcodeHTML($cod, "EAN13");
$html = '';
for($x = 0; $x < $qtd; $x++ ){
$html .= $codigo;
$html .= '<div style="margin-left: 8%;">' . $cod .'</div><br><br>';
};
$documentTemplate = '
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://www.example.com/style.css">
</head>
<body>
<div id="wrapper" style="height=8cm; width=5,5cm">
'.$html.'
</div>
</body>
</html>';
if ( get_magic_quotes_gpc() )
$documentTemplate = stripslashes($documentTemplate);
$dompdf = new DOMPDF();
$dompdf->load_html($documentTemplate);
$dompdf->set_paper("a7", "portrail");
$dompdf->render();
return $dompdf->stream($produto->TXT_NOMEX_PRODU);
When I open the pdf
this way:
works great for you, but when I click to print in without less generates white spaces on the sheet so:
I have tried to change the type of the sheet plus all of them taking into consideration that I have a sheet A4
, the printer configuration is so:
What should I do ?
Remember once again that my printer is your Elgin i9 website for more product information.
Utilise laravel 5.4
and the DOM PDF