CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Fatal error when generate PDF letter
Pages: [1]

Author Topic: Fatal error when generate PDF letter  (Read 1391 times)

jchnews

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.3.x
Fatal error when generate PDF letter
February 20, 2013, 06:45:38 am
Hello,

I have an issue to create PDF letter
I make a advanced search, select some contact, select default civicrm template ...
and when i click on generate PDF letter i get this fatal error :

Fatal error: Cannot redeclare mb_substr() (previously declared in /home/****/public_html/wp-includes/compat.php:17) in /home/****/public_html/wp-content/plugins/civicrm/civicrm/packages/dompdf/include/functions.inc.php on line 374

Is this a bug from civicrm ?
How to solve it ?

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal error when generate PDF letter
February 20, 2013, 07:36:18 am

this is a conflict between dompdf (a 3rd party package) and wordpress. If you can investigate and figure out a workaround that would be great

alternatively, you can use wkhtmltopdf (which is better higher performing library) to generate pdf's

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jchnews

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.3.x
Re: Fatal error when generate PDF letter
February 21, 2013, 03:53:43 am
Thanks for your reply

wkhtmltopdf can be selected on civicrm admin ?
Could you explain me what i have to do to make the change

Thanks

Guy Iaccarino

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 5
    • Greenleaf Advancement
  • CiviCRM version: 4.4.10, 4.5.4
  • CMS version: WordPress 4, Drupal 7, Drupal 6, Joomla 3
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Fatal error when generate PDF letter
February 21, 2013, 05:20:06 am
I haven't implemented this package, but as far as specifying it in the CiviCRM interface, go to Administer - System Settings - Undelete, Logging, and RECAPTCHA. There is a text field to insert the path to the wkhtmltopdf executable with the following help text: "wkhtmltopdf is an alternative utility for generating PDF's which may provide better performance especially if you are generating a large number of PDF letters or receipts. Your system administrator will need to download and install this utility, and enter the executable path here."

Let me know if you have any luck with it. I've been thinking about giving that a try myself, since some of my clients max out at about 25 PDF letters at a time, which so far hasn't been critical, but it's still not ideal.

Best,

Guy Iaccarino
www.greenleafadvancement.com
Guy Iaccarino
www.greenleafadvancement.com

jchnews

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Wordpress
  • MySQL version: 5.1
  • PHP version: 5.3.x
Re: Fatal error when generate PDF letter
February 21, 2013, 10:35:57 am
Hello

i have succeed in installing wkhtmltopdf on my server.
You can see here the tutorial i have follow :
http://karmicsangoma.blogspot.com/2012/11/how-to-install-wkhtmltopdf-on-centos-63.html

Be careful for my server it was this package : wkhtmltopdf-0.9.9-static-i386.tar.bz2

Then in the civicrm admin page Undelete, Logging, and RECAPTCHA
You insert this : /usr/bin/wkhtmltopdf

No it's work for me in my first tests

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Fatal error when generate PDF letter
February 24, 2013, 12:55:41 am
When you use wkhtmltopdf to create your PDFs, are you able to set top/bottom margins?   (this relates to the JIRA issue at: http://issues.civicrm.org/jira/browse/CRM-11939)   
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Fatal error when generate PDF letter

This forum was archived on 2017-11-26.