Upgrade to version 4.5.1 broke PDF Reports

(3 posts) (2 voices)

Tags:

No tags yet.

  1. schlackl, Member

    We recently upgraded MyDBR to version 4.5.1 however following that upgrade we are now experiencing an error when trying to view a PDF report.

    Following the upgrade we updated both Ion Cube and Chart Director however we seem to be having issues with wkhtmltopdf.

    The error on screen is:
    There was an error (code:11) producing the pdf document
    Failed command: wkhtmltopdf -q --header-html https://atm-reporting.powerplaydestination.com/whr/user/export_header_pdf.php --margin-top 20 --header-spacing 8 /tmp/mydbr_export_1025719429.html -

    The Apache logs show the following:
    'QPixmap: Cannot create a QPixmap when no GUI is being used' when trying to generate the pdf

    I googled for that and it suggested an upgrade to wkhtmltopdf but I tried version 0.10.0_rc2 and it has the same issue.

    That said, I am able to run wkhtmltopdf from the command line without error - generates a PDF perfectly as expected.

    Any ideas on what could be happening? Not sure where to go from here.

  2. myDBR Team, Key Master

    This is an issue with wkhtmltopdf called from PHP. The version 4.5.1 did not change how calling is done.

    First thing to do is to make sure you have the latest wkhtmltopdf installed. The newest stable release is 0.12.2.1 (http://wkhtmltopdf.org/downloads.html). There is also alpha release available which is based on newer Qt.

    Depending on the server OS and installed packages, you might also be missing the X-server (if on Linux / Unix server) which wkhtmltopdf uses when running. See http://thelazylog.com/how-to-resolve-cannot-create-a-qpixmap-when-no-gui-is-being-used-when-running-wkhtmltopdf/.

    --
    myDBR Team

  3. schlackl, Member

    Thank you for the response - I tried version 0.12.2.1 but that had the same issue. I then tried the preview version 0.12.3 and that worked!

    Back up and running and PDF output is working again :)


Reply

You must log in to post.