wkhtmltopdf error

(5 posts) (2 voices)


No tags yet.

  1. Giovannni, Member

    After last updates (5.9.1) I have an error when launching pdf export.

    Tried to debug, launching the command in a terminal but no way:
    QSslSocket: cannot resolve CRYPTO_num_locks...

    Launching similar command in terminal is ok only when i remove the switch --header-html.

    Since I don't need header, there is a workaround to execute this command without --header-html switch?

  2. myDBR Team, Key Master

    What is the wkhtmltopdf version you are using and what OS / distro / version you are using? Do you gave libssl-dev installed? Fixing it in the OS level is the recommended fix.

    You can skip the header-html by passing empty value for it:

    select 'dbr.wkhtmltopdf', "--header-html ''";

    Alternatively, define the wkhtmltopdf command inside myDBR to include the option:

    $mydbr_defaults['export']['wkhtmltopdf']['command']="/usr/local/bin/wkhtmltopdf --header-html ''";

    myDBR Team

  3. Giovannni, Member

    OS CentOS Linux release 7.9.2009 (Core)
    Kernel 3.10.0-1160.21.1.el7.x86_64
    php 7.2

    I've installed openssl-devel (same as libssl-dev in centos) and restarted apache, but same error.

    Changed mydbr_defaults with no success, original --header-html is still in the command:
    There was an error (code:139) producing the pdf document
    Failed command: /opt/wkhtmltopdf/bin/wkhtmltopdf --header-html "" -q --margin-top "20" --header-spacing "8" --header-html "https://mydbr.mysite.it/user/export_header_pdf.php" --replace rdate "08/04/2021" --replace rtime "15.36.24" /tmp/mydbr_export_1799345629.html -

    Same result by passing empty value:
    Failed command: /opt/wkhtmltopdf/bin/wkhtmltopdf -q --margin-top "20" --header-spacing "8" --replace rdate "08/04/2021" --replace rtime "15.49.05" --header-html "" /tmp/mydbr_export_994860112.html -

    Same result using both simple and double quote. Same result using http only.

  4. myDBR Team, Key Master

    Try updating to latest wkhtmltopdf version as the wkhtmltopdf 0.12.5 had fixes for this . You can download the latest (0.12.6) directly from wkhtmltopdf downloads.

    myDBR Team

  5. Giovannni, Member

    Updating to latest 0.12.6 and now exporting pdf works like a charm!

    Thank you very much.


You must log in to post.