Problems with print layout

1

I'm having trouble setting up print layout in Elgin i9 , I'm putting script in laravel 5.4 like this:

    $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 pdf it looks like this:

Itworkscoolforthere,butwhenIclicktoprintinnomorewithoutlessitgenerateswhitespaceonthesheetlikethis:

IhavealreadytriedtochangethetypeofthesheetplusallofthemaretakingintoaccountthatIhaveaA4sheet,theprinterconfigurationlookslikethis:

WhatshouldIdo?

  

It'sworthrememberingonceagainthatmyprinterisElgini9your site for more information about product.

I use laravel 5.4 and DOM PDF

    
asked by anonymous 02.03.2017 / 23:58

0 answers