FahimAnzamDip / triangle-pos

Triangle POS is an open source Inventory Management with POS System. Developed with Laravel 10, Bootstrap 4 & Livewire 3. It's completely free to use.
645 stars 207 forks source link

Print Barcode Download PDF Shows Error #45

Open Michlaguardia99 opened 1 year ago

Michlaguardia99 commented 1 year ago

The exit status code '1' says something went wrong: stderr:

FahimAnzamDip commented 1 year ago

Refer to laravel snappy docs.

Michlaguardia99 commented 1 year ago

Also on the sales - actions - pos invoice

the print is not working, im debugging it but still cant find what's happening

FahimAnzamDip commented 1 year ago

All the printing is using laravel snappy please check their setup process if you are using windows.

zalzdarkent commented 6 months ago

Check the vendor/h4cc folder, there is a wkhtmltopdf folder. Download wkhtmltopdf on the internet, then extract it and the wkhtmltopdf folder will appear. Replace the wkhtmltopdf folder in vendor/h4cc with the wkhtmltopdf folder you just extracted. Then look for snappy.php in the config folder and direct the path to wkhtmltopdf.exe which is in vendor/h4cc/wkhtmltopdf/bin.

uvindu94 commented 3 months ago

The error message you're encountering indicates that the system is unable to find the specified path for the wkhtmltopdf executable. This typically happens when the path provided to wkhtmltopdf.exe is incorrect or the executable is missing from the specified location.

Steps to Resolve the Issue:

  1. Verify the Path: Ensure that wkhtmltopdf.exe is located in the specified directory: C:\wkhtmltopdf\bin\wkhtmltopdf.exe. If it’s not in this directory, you’ll need to update the path to the correct location.

  2. Install wkhtmltopdf (If Not Installed): If wkhtmltopdf is not installed, download and install it: You can download it from the official website: wkhtmltopdf.org. After installation, ensure that the executable (wkhtmltopdf.exe) is located in C:\wkhtmltopdf\bin.

  3. Add wkhtmltopdf to the System Path (Optional): Adding wkhtmltopdf to your system's PATH environment variable allows you to run wkhtmltopdf from any location without specifying the full path. To add it to your PATH: Right-click on This PC or My Computer on the desktop or in File Explorer. Select Properties. Click on Advanced system settings. Click on Environment Variables. In the System variables section, scroll down and select the Path variable, then click Edit. Click New and add the path C:\wkhtmltopdf\bin. Click OK to close all dialogs.

  4. Test the Installation: Open a Command Prompt and type wkhtmltopdf to see if the command is recognized. If the command works, try running your application again.

  5. Check the Command in Your Application: Ensure that your application is correctly calling the wkhtmltopdf command with the right parameters. If you’re using a package or library to generate PDFs, check its configuration settings for the path to wkhtmltopdf. Example Configuration in Laravel: If you're using Laravel with a package like barryvdh/laravel-snappy to generate PDFs, the configuration might look like this in config/snappy.php:

'pdf' => [
    'enabled' => true,
    'binary'  => 'C:\wkhtmltopdf\bin\wkhtmltopdf.exe',
    'timeout' => false,
    'options' => [],
    'env'     => [],
],

Ensure that the binary path is correct.