I have a problem (well, in fact, more than one Why can't I export a Contact Detail report to CSV?) with civiReport. I can't export my contact report to pdf.

At first, when I clicked I only got a white screen (white screen of dead) and nothing happened. Then I found this...


... so I changed memory limit value both in php.ini and civicrm settings to 512M. I have also increased max execution time , just in case. Nothing happens. It simply waits "loading" until max execution time runs off (and it's 300 seconds).

So I don't know what else I can do. Please, help :( .

Iván Lago

IT Engineer at Engineers Without Borders Galicia

More info:

Server version: Apache/2.2.22 (Debian)

CMS: Drupal 7.36

CiviCRM version:4.6.0

PHP: 5.4.39-0+deb7u2

MySQL: 5.5.41-0+wheezy1

  • This functionality works on the 4.6 demo site at d46.demo.civicrm.org so the issue is not within CiviCRM itself, rather with your server set-up. Have you checked the logs to see if there any clues as to what's happening?
    – Graham
    Commented Apr 15, 2015 at 10:26

1 Answer 1


There are a number of reasons PDFs from reports can crash. It's usually a matter of running out of memory, but that's not exclusively a hosting problem. If you have a really big report with tons of pages and tons of columns, that can cause problems when a 4- or 5-page report displays easily. Remember: when you view the report, you're only seeing one page's worth; when you're sending it to PDF, you're rendering all the pages at once.

You should probably try installing wkhtmltopdf, which runs a headless WebKit on your server to generate a PDF. CiviCRM has built-in support for it; it's just not the default because it doesn't assume you can install additional software on the server.

Once you've installed it (there's a package for Debian wheezy), just go in CiviCRM to Administer > System Settings > Misc and tell it where to find wkhtmltopdf on your system.

  • I can install everything (that would run on debian). In fact I have phisical access to the server. We have our own server with a nice symetric 30 Mbs connection. No bandwith limits, no disq quouta no nothing :D. It's one of the advantages of having our headquartes at the University of A Coruña. We don't have to pay nothing for that stuff. I'll try and let you know. Thanks!!! Commented Apr 15, 2015 at 14:33
  • 3
    Yay!! You did it man!! Thanks!! To help any other people that might run into this problem let me add that you also need to install xvfb, because simply linking to /usr/bin/wkhtmltopdf will cause a "cannot connect to X server" error. After installing xvfb and changing wkhtmltopdf route to "/usr/bin/xvfb-run -- wkhtmltopdf" it works like a charm :D. More info of this at issues.civicrm.org/jira/browse/CRM-13292 . Thanks Andrew, owe you a beer. Commented Apr 15, 2015 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.