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) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Traditional Chinese Mailing Label in PDF format
Pages: [1]

Author Topic: Traditional Chinese Mailing Label in PDF format  (Read 11351 times)

fastfood

  • Guest
Traditional Chinese Mailing Label in PDF format
May 22, 2008, 10:38:09 am
My Traditional Chinese address either in Mac OS X Tiger or Windows XP using Adobe Reader with Asian Font Pack installed can only see squares. I check Utils/PDF/Label.php with Civicrm 2.0.3 under Joomla! 1.0.15 UTF-8, the fontName is 'Symbol'.  MySQL is unicode already.

What should I do to make the mailing label works with Traditional Chinese, and in the near future, we have Simplified Chinese address?

Many thanks in advance.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Traditional Chinese Mailing Label in PDF format
May 23, 2008, 03:34:58 am
To render the PDF labels, we use the UFPDF package, which in turn uses the DejaVu Sans font. I’m not sure whether this font has coverage for CJK characters, and even if it has, I’m not sure UFPDF knows how to properly generate PDF files with them.

I created CRM-3144 to track this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

fastfood

  • Guest
Re: Traditional Chinese Mailing Label in PDF format
May 25, 2008, 07:49:11 am
From CiviCRM roadmap page, v2.1 will work with Joomla! 1.5.x while my production site runs Joomla! 1.0.x even I can wait until late July 2008. Is it true?

Would the Chinese characters in mailing label be resolved in v2.1 while my site runs with Joomla! 1.0.x?

Thank you!

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Traditional Chinese Mailing Label in PDF format
May 28, 2008, 08:17:59 am
Currently, this issue has been pushed back to CiviCRM 2.2. I’m not really sure how to investigate it, either; it seems the DejaVu font does not support CJK characters.

Do you have a font that you could try in place of DejaVu Sans on your server and try whether the issue is with the font or with the UFPDF library?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

fastfood

  • Guest
Re: Traditional Chinese Mailing Label in PDF format
June 06, 2008, 09:29:32 pm
Is there any tutorial for "How to add a font to Civicrm for PDF generation?" or "How to makefont from a Windows mingliu.ttc?" And, where to place the font in CiviCRM?

Sorry to have so many questions as I google the web and found no support on how to add a font for CiviCRM and make a CJK font for CiviCRM.  Would you show me in detail?

Thank you very much.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Traditional Chinese Mailing Label in PDF format
June 09, 2008, 03:43:58 am
I just checked, and unfortunately it’s not trivial – it requires not only replacing of a TTF file, but also regenrerating of some other files.

If you could send me (shot@civicrm.org) the TTF file you mention, I could regenerate the files and send them back to you (and try whether CJK labels work for me).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

CanOfPoke

  • Guest
Re: Traditional Chinese Mailing Label in PDF format
July 17, 2008, 06:01:27 am
Did anyone managed to get this to work in the end? Sounds very interesting i could be tempted to give it a go!

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Traditional Chinese Mailing Label in PDF format
July 19, 2008, 12:21:46 pm
Unfortunately, neither upgrading to the current DejaVu Sans version, nor using the TTF file I got from fastfood worked for me.

We are considering a switch to TCPDF, but I’m not sure this will take care of this issue.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
Re: Traditional Chinese Mailing Label in PDF format
September 09, 2009, 02:28:00 am
Any update on this?  I am on 3.0 beta and the Chinese characters are all messed up in the PDF output (labels, reports, etc).

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: Traditional Chinese Mailing Label in PDF format
September 09, 2009, 03:56:36 am

no, a switch to tcpdf seemed to break mailing labels etc, so we rolled back. would be great for you to pursue it and see if you can make progress and get it working on chinese and latin characters

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

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
Re: Traditional Chinese Mailing Label in PDF format
September 10, 2009, 02:02:09 am
For label printing, I did manage to get this working for Chinese by using a patch that I downloaded from http://www.fpdf.org/download/chinese.zip.  But this is a very Chinese-specific patch.

For report printing, I just talked to Brian, and it seems that the latest release of DOMPDF still does not support utf8 with the default adaptor - CPDF.  Someone mentioned that we can get unicode support by switching the adaptor to the licensed version of PDFLib, but I have not tried it yet.  I think we will take the easy way out at this moment - use Print Report and print to a pdf printer driver (like CutePDF or DoPDF).

superhua

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
  • MySQL version: 5.5.29
  • PHP version: 5.4.10
Re: Traditional Chinese Mailing Label in PDF format
February 13, 2013, 07:09:28 pm
@eggtart: Could you please post how you used the chinese.zip patch? (I'm familiar with the file, but have not been successful in using it.)

We're in a similar situation and would appreciate knowing how to generate Chinese in the PDFs of labels.

Many thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Traditional Chinese Mailing Label in PDF format

This forum was archived on 2017-11-26.