mercredi 21 octobre 2020

Space before %pdf in snappy pdf generation

I am using Snappy pdf and all things are working fine but I tried to upload on some websites then it says "PDF header is not at the start of file". I analyzed this error and found that this is because when i generate the pdf file then the pdf is taking space before the %pdf syntax. I opened the generated pdf in the notepad++.

My config file is like this

 return array(
'pdf' => array(
    'enabled' => true,
    'binary'  => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
    'margin-top' => 0,
    'margin-right' => 0,
    'margin-bottom' => 0,
    'margin-left' => 0,
),

Could you please help me to find a solution on how to remove this space when the pdf generate



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

Aucun commentaire:

Enregistrer un commentaire