laravel-snappy library allways generate pdf in letter format

I´m traying to generate pdf in my application web with laravel-snappy, and always generate pdf in format landscape but i´m setting other configuration:

public function handle()
{
$pdfName = "precontrato.pdf";
$path = 'app/contratos/'.$this->precontrato->serie.'-'.$this->precontrato->contador.'/'.$pdfName;
$pdfPath = storage_path($path);

$pdf = PDF::loadView('pdf.precontrato', ['precontrato' => $this->precontrato])
->setPaper('a4')
->setOrientation('portrait')
//->setOption('zoom', 1.2)
->setOption('footer-center', 'EDICIONES GRUPO DELUXE 2013 S.L.U está Inscripta en el Registro Mercantil de Granada al Tomo 1548 Folio 42 Hoja GR46323 Inscrip. 1ª')
->setOption('footer-font-size', 5);

$pdfCreado = $pdf->save($pdfPath, true);

}

this is my job i´m need a4 format to my pdf but i don´t know, always this library generated me, my pdf in letter format:

this is my snappy.php

'pdf' => [
'enabled' => true,
'binary' => '"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf"',
'timeout' => false,
'options' => array(
'encoding' => 'UTF-8',
'viewport-size' => '1024x768',
//'margin-top' => 0,
//'margin-bottom' => 7,
//'margin-left' => 20,
//'margin-right' => 20,
'footer-right' => "Página [page] de [toPage]",
'footer-font-size' => 3
)
],

'image' => [
'enabled' => true,
'binary' => '/usr/local/bin/wkhtmltoimage',
'timeout' => false,
'options' => [],
'env' => [],
],

i don´t know where i can to show to change this...

Thanks for help



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2USNWY5
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery