Hi guys,
I got a problem when I want to download a PDF from view.
When I remove the assets its works fine, but when I use them I got this error...
he exit status code '1' says something went wrong:
stderr: "Loading pages (1/6)
[> ] 0%
[======> ] 10%
QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
[==========> ] 18%
[===============> ] 25%
[==================> ] 31%
[======================> ] 38%
[=========================> ] 43%
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[==============================> ] Page 1 of 2
[============================================================] Page 2 of 2
Done
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
"
stdout: ""
command: /usr/local/bin/wkhtmltopdf-amd64 --lowquality --page-size 'letter' --enable-javascript --javascript-delay '4000' --viewport-size '1366x1024' '/tmp/knp_snappy5991c1b4cb1a41.29456871.html' '/tmp/knp_snappy5991c1b4cb2446.10870121.pdf'.
I have two assets (css and js).
<link rel="stylesheet" href="{{ url('/').mix('css/pdf.css') }}">
and
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js"></script>
The view render without problem.
Can you help me pls, this problem repeats in Homestead (Windows) and Forge (Ubuntu Server).
Regards.
This is the Controller instance...
$invoiceFile = 'invoice_filename.pdf';
$pdf = \PDF::loadHTML($view->render())
->setOption('viewport-size', '1366x1024')
->setOption('enable-javascript', true)
->setOption('javascript-delay', 4000)
->setPaper('letter');
$pdf->download($invoiceFile);
Remove "https" from all the resources
<script src="http://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js"></script>
I realize this is almost a year old, and unresolved still, but what if you can't remove https? As in the assets are ONLY available via https?
This might help - https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3001
thanks, I moved on and found a different solution that didn't require snappy/wkhtmltopdf.
Hi @ghost, what solution did you use instead? thanks
Worked for me: apt-get install libssl1.0-dev
Worked for me: apt-get install libssl1.0-dev
thanks a lot its working for me
Worked for me: apt-get install libssl1.0-dev
Cool, worked for me <3
Worked for me: apt-get install libssl1.0-dev
Excellent.. Thank You.. Worked for me..
Worked for me: apt-get install libssl1.0-dev
thanks a lot its working for me
Great solution!!!
Thanks @sergomet It works for me
Thanks @bibhash it works for me, to use cmd apt-get install libssl1.0-dev.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
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.
This issue occurs still on Ubuntu 20.04.1 (homestead latest) there is no longer a candidate for libssl1.0-dev
I'm still trying to resolve this myself, but not getting very far :(
Most helpful comment
Worked for me: apt-get install libssl1.0-dev