Since a default encoding for Drupal generated pages is UTF-8, I believe it would be good that such pages could be properly handled by this module. Now, my generated PDF doesn't contain accented letters - at least not as they should be. As much as I've found on Internet, there are some plugins needed, as dompdf itself can not handle utf-8, but I don't know how exactly to include such a plugin to do the job.

CommentFileSizeAuthor
#5 257896-utf8_fix.patch1.3 KBsammys
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Can you tell what did you find on the internet?

João

thehong’s picture

Subcribe

LUTi’s picture

Hi,

I've googled for "dompdf" and "utf-8", and found the following: http://trac.symfony-project.com/wiki/sfDomPDFPlugin.

But, I have no idea how to go on with it... :-(

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Well,

The tool you found is a wrapper of dompdf for the symphony project. Much like the print_pdf module is able to do for anyone advanced enough. There is a Drupal 5.x module (called dompdf :) that does exactly what the tool you found does..

The pages that might help you are:

http://codeigniter.com/forums/viewthread/69388/
http://sourceforge.net/forum/message.php?msg_id=4122270

According to the last one, we only have to wait for dompdf 0.5.2 to come out... I am changing the status to closed, since the solution must come from dompdf or the use of a pdflib commercial license..

João

sammys’s picture

Status: Closed (fixed) » Active
FileSize
1.3 KB

Hi there,

I've done some work on getting UTF-8 support working with the print module. So far it's not commit worthy but I figured I'd reopen this issue and update the community with the latest developments from dompdf and my laptop. This took me some time to go through and I'm hoping this post will save people some time.

Dompdf 0.6.0 beta 1 introduced UTF-8 support and it's working! Unfortunately, it's not working out of the box so some fiddling is needed. Here are the things you need to do:

  • Create UTF-8 versions of the fonts you want to use. Dompdf comes only with non-UTF-8 fonts in its cache. Thankfully the lovely folks working on Dompdf have made a web-based font preparation tool that will generate non-UTF-8 and UTF-8 cached fonts and the cache file for you! Instructions can be found on the Google Code website.
  • Use the attached patch to remove the code from print_pdf module that converts from UTF-8 to ISO-8859-1. UTF-8 is disabled by default and this patch enables that too.
  • If you are using a different font then you have to alter the CSS so that font is used.

I only added one font to the cache and it's working nicely. You can easily figure out how to amend the cache file using a text editor so I'm not going to explain that. :)

Here is the patch. Enjoy!

jcnventura’s picture

Status: Active » Fixed

Hi,

I've just added some support for the Unicode mode to the CVS repository. I'm leaving the ISO-8859-1 replacement in place until dompdf ships with Unicode fonts, as that step is still slightly confusing.

João

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nguyentran’s picture

Is it a easy way to make UTF-8 work on DOMPDF, do we make it complex to use