我正在使用框架的5.5,最近下载了wkhtmltopdf-amd64软件包的0.12.5(dev-master)来尝试解决此错误。
我知道这通常是由于html中的SSL(https)网址所致,但是我已经获得了要打印的文件,并且在我的生产环境中也可以使用。
我在测试环境中更改了新代码(已对其进行了修改,以使用令人敬畏的5字体),以便仅使用v4。据我所知,文件中的链接(其中1个有效而1个无效)是相同的。
我的测试文件的html中是否还有其他问题会导致此处显示的错误:
(1/1) RuntimeException
The 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
[========> ] 14%
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
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
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
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
Warning: Failed to load https://mcentric-test.herokuapp.com/css/jumbotron.css (ignore)
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
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
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
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
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://mcentric-test.herokuapp.com/images/mCentric_logo.png (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/meeting.jpg (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/outlook.jpg (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/google.jpg (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/yahoo.jpg (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/ical.jpg (ignore)
Warning: Failed to load https://mcentric-test.herokuapp.com/images/mCentric_logo_blue.png (ignore)
[============================================================] 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 1
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: /app/vendor/bin/wkhtmltopdf-amd64 --lowquality --load-error-handling 'ignore' '/tmp/knp_snappy5bd9df39f00ca0.32809410.html' '/tmp/knp_snappy5bd9df39f02363.36498894.pdf'.
in AbstractGenerator.php line 378
html produced from test server
html produced on production server (that does NOT error out) 重申一下,需要6个https链接进行格式化的外观确实使用0.12.4二进制文件成功创建了PDF。
0.12.4和0.12.5二进制文件(在测试环境中尝试使用)都无法创建PDF并导致上面的错误文本。
答案 0 :(得分:0)
我正在发布此答案,以免将来有人不停地进行审查。
测试和生产环境是heroku托管的环境。
wkhtmltopdf-amd64二进制文件在cedar-14堆栈上(生产)工作正常。
测试环境的堆栈已升级,这似乎是它停止工作的原因。
答案 1 :(得分:0)