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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • CiviReport not handling currency symbols in PDF
Pages: [1]

Author Topic: CiviReport not handling currency symbols in PDF  (Read 2440 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
CiviReport not handling currency symbols in PDF
August 24, 2009, 03:28:16 pm
Hi - I generated a report on sandbox that had some Membership payments in Euros. The PDF gave me an odd symbol - see attached
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: CiviReport not handling currency symbols in PDF
August 24, 2009, 11:05:08 pm
peter :

Can you file an issue for this?

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Sunil

  • I post frequently
  • ***
  • Posts: 131
  • Karma: 23
  • The community around a product more important than the product itself?
    • CiviCRM
Re: CiviReport not handling currency symbols in PDF
August 25, 2009, 03:35:33 am
hi peter,

Can you check, bellow changes are working for you?

Changes are inside the html2pdf function

CRM_Utils_PDF_Utils::html2pdf()

Code: [Select]
--- CRM/Utils/PDF/Utils.php     (revision 23422)
+++ CRM/Utils/PDF/Utils.php     (working copy)
@@ -95,6 +95,8 @@
         foreach ( $values as $value ) {
             $html .= "{$value}\n";
         }
+        //support to UTF-8
+        $html = iconv('UTF-8','Windows-1252//TRANSLIT', $html);
         $dompdf->load_html( $html );
         $dompdf->set_paper ('a3', 'landscape');
         $dompdf->render( );

I checked for Euro(EUR) AND GBP, and it's working fine.


Sunil
The community around a product more important than the product itself?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviReport not handling currency symbols in PDF
August 25, 2009, 12:31:41 pm
hmm - just retried on sandbox and same outcome - see attached
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: CiviReport not handling currency symbols in PDF
August 25, 2009, 12:32:54 pm

sunil probably did not check in that code into the repository. can you patch the file manually on your local install

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviReport not handling currency symbols in PDF
August 25, 2009, 12:40:38 pm
errr - possibly not in near future - isn't an issue that is affecting us - just one i spotted when demoing some civireport options.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • CiviReport not handling currency symbols in PDF

This forum was archived on 2017-11-26.