Barryvdh/laravel-snappy - The exit status code '1' says something went wrong:\nstderr: \"Loading pages (1/6)\r\n

Asked
Active3 hr before
Viewed126 times

4 Answers

status
90%

Sorry, something went wrong. ,now use this path in laravel snappy config file,I m using this code in controller but i m facing this error, Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

public
function getPDF() {
   $pdf = PDF::loadView('ab');
   return $pdf - > download('invoice.pdf');
}
load more v
88%

Install laravel-snappy,So, I tried by updating the path directly into the vendor/barryvdh/laravel-snappy/config/snappy.php,Surprisingly, this works. So, I could not figure out why this laravel-snappy is not reading the path from config/snappy.php and instead reading from the vendor file.,I am trying to export data to pdf using laravel-snappy. I have

SO, you can try the following commands.

php artisan view: clear
php artisan route: clear
php artisan cache: clear
php artisan config: clear
php artisan clear - compiled
composer dump - autoload
php artisan vendor: publish
72%

I understand laravel-snappy is only Laravel 5. DOMPdf gives me many font troubles that i never experienced with Laravel Snappy.,To customise the configuration file, copy the file /vendor/barryvdh/laravel-snappy/config/snappy.php to the /config folder.,This Snappy Wrapper for Laravel is open-sourced software licensed under the MIT license,Binaries installed and test from console ---- check Laravel 8 with barryvdh/laravel-snappy installed ---- check try this example:

cp vendor / h4cc / wkhtmltoimage - amd64 / bin / wkhtmltoimage - amd64 / usr / local / bin /
   cp vendor / h4cc / wkhtmltopdf - amd64 / bin / wkhtmltopdf - amd64 / usr / local / bin /
load more v
65%

The exit status code '1' says something went wrong:\n stderr: "'C:/xampp/htdocs/pdftesting/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf' is not recognized as an internal or external command,\r\n operable program or batch file.\r\n "\n stdout: ""\n command: C:/xampp/htdocs/pdftesting/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf --lowquality --images --enable-javascript --javascript-delay "10" "C:\WINDOWS\TEMP\knp_snappy5ad430445b31e9.92776484.html" "C:\WINDOWS\TEMP\knp_snappy5ad430445fac87.79827170.pdf",or add double quotes to the bin path for wkhtmltopdf 'binary' => '"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf"',You didn't mention that if you installed wkhtmltopdf or not on windows. If not visit https://wkhtmltopdf.org/downloads.html, download according to your windows requirement (if your windows is 32bit then download 32bit, if 64bit download 64bit msi file) and install it to default location.,'binary' => '"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf"'

I am trying to create a PDF in Laravel 5.6 using Barryvdh/snappy. my config/snappy.php looks like

'pdf' => array(
   'enabled' => true,
   'binary' => 'C:/xampp/htdocs/pdftesting/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf',
   'timeout' => false,
   'options' => array(),
   'env' => array(),
),

and my controller looks like,

        $pdf = PDF::loadView('pdf', $data);
        return $pdf - > download('test.pdf');
load more v

Other "status-undefined" queries related to "Barryvdh/laravel-snappy - The exit status code '1' says something went wrong:\nstderr: \"Loading pages (1/6)\r\n"