Hướng dẫn wkhtmltopdf-amd64 is not recognized as an internal or external command - wkhtmltopdf-amd64 không được nhận dạng là lệnh nội bộ hoặc bên ngoài

Hi,

Tôi đã làm theo các hướng dẫn trên https://github.com/knplabs/snappy#wkhtmltopdff-bary-s-composer-dependences và tôi đã thay đổi nhị phân của pdf và hình ảnh trong tệp cấu hình của mình như thế này:

    'pdf' => array(
        'enabled' => true,
        'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
        'timeout' => false,
        'options' => array(),
    ),
    'image' => array(
        'enabled' => true,
        'binary' => base_path('vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64'),
        'timeout' => false,
        'options' => array(),
    ),

Nhưng tôi tiếp tục nhận được:

Tôi không biết mình đang làm gì sai.

Thanks,

Xin chào, tôi gặp vấn đề khi tải xuống pdf với lỗi snappy snappy như thế này

Mã trạng thái thoát '1' nói có điều gì đó không ổn: stderr: "'C: \ xampp \ htdocs \ laravel_snappy_pdf Tệp chương trình hoặc tập tin hàng loạt. "

Đây là cấu hình của tôi:

return mảng (

'pdf' => array(
    'enabled' => true,
    'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),
'image' => array(
    'enabled' => true,
    'binary'  => 'vendor/h4cc/wkhtmltoimage-amd64/wkhtmltoimage',
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),

);

Có thể giúp đỡ cho lỗi này?

Hướng dẫn wkhtmltopdf-amd64 is not recognized as an internal or external command - wkhtmltopdf-amd64 không được nhận dạng là lệnh nội bộ hoặc bên ngoài

cùng một vấn đề .. Lỗi tương tự: Mã trạng thái thoát '1' nói có gì đó sai: stderr: "'C: \ laragon \ www \ boomerangweb \ laravel_supplier_portal Được công nhận là một lệnh nội bộ hoặc bên ngoài, chương trình hoạt động hoặc tệp hàng loạt. Định hướng "Cảnh quan" "C: \ Users \ TDClic1 \ AppData \ Local \ Temp \ knp_snappy5d23501b955fa0.08704730.html" "
same error : The exit status code '1' says something went wrong: stderr: "'C:\laragon\www\boomerangWeb\laravel_supplier_portal\vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64' is not recognized as an internal or external command, operable program or batch file. " stdout: "" command: C:\laragon\www\boomerangWeb\laravel_supplier_portal\vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality --orientation "landscape" "C:\Users\TDCLIC1\AppData\Local\Temp\knp_snappy5d23501b955fa0.08704730.html" "C:\Users\TDCLIC1\AppData\Local\Temp\knp_snappy5d23501b95d6c9.42723756.pdf".

Cùng cấu hình:

`return mảng (

'pdf' => array(
    'enabled' => true,
    'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),
'image' => array(
    'enabled' => true,
    'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltoimage-amd64'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),

); `

Tôi đã tìm thấy giải pháp cho vấn đề này, bạn phải cài đặt wkhtmltopdf cho windows với trình soạn thảo:

Nhà soạn nhạc yêu cầu Wemersonjanuario/WKHTMLTOPDF-Windows "0.12.2.3"

và sử dụng điều này trên ứng dụng/snappy.php

`return mảng (

'pdf' => array(
    'enabled' => true,
    'binary' => base_path('vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltopdf.exe'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),
'image' => array(
    'enabled' => true,
    'binary' => base_path('vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltoimage.exe'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),

); `

Tôi đã tìm thấy giải pháp cho vấn đề này, bạn phải cài đặt wkhtmltopdf cho windows với trình soạn thảo:

Nhà soạn nhạc yêu cầu Wemersonjanuario/WKHTMLTOPDF-Windows "0.12.2.3"

và sử dụng điều này trên ứng dụng/snappy.php

`return mảng (

'pdf' => array(
    'enabled' => true,
    'binary' => base_path('vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltopdf.exe'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),
'image' => array(
    'enabled' => true,
    'binary' => base_path('vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltoimage.exe'),
    'timeout' => false,
    'options' => array(),
    'env'     => array(),
),

); `

Tôi đã tìm thấy giải pháp cho vấn đề này, bạn phải cài đặt wkhtmltopdf cho windows với trình soạn thảo:

Nhà soạn nhạc yêu cầu Wemersonjanuario/WKHTMLTOPDF-Windows "0.12.2.3"
Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy.
If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.