Greek Character Encoding Problem.

jlee

Member
Hello again.
The data and the labels of my forms are in greek.
When i create a pdf the characters that are greek apear like this: ?????
I put this on my template php file
<?php
header('Content-type: text/html; charset=utf-8');
?>
but nothing changes. i called mb_internal_encoding(); and mb_http_output(); to see what encoding it is used and it is in UTF-8.
What am i doing wrong?
Thanks!
 
You might want to check your List - under the Details / Advanced tab, there is a Collation setting.

I am not sure that you should need to change the templates to make it display in Greek - if you have Greek set in your Joomla site, that should be enough.
 
I just change the Collation setting from utf8_general_ci to utf8_unicode_ci but nothing changed.
Greek language like other languages is not listed in that setting. :(
 
I think that field is to do with how text is stored in the database. utf_general_ci should cover greek I think.

Is your Joomla installation set to Greek?

Otherwise, this is outside my own experience since I use English.
 
My installation is not set to Greek.
Something tells me that it is a DOMPDF problem. Because in database greek characters are stored and can be viewed properly.
 
Ah sorry - I had somehow missed that it was a PDF issue.

Yes - you could be right about it being DOMPDF. I guess you need to research this and see if you can suggest a fix.

S
 
The steps i followed are this:
I downloaded the arial fonts from: http://www.fabrikar.com/forums/index.php?threads/new-pdf-option.26829/page-4 because i could not find arial fonts on github as you said.
I upload them to dompdf/lib/fonts.
I make a copy of the default template in com_fabrik/views/form/tmpl and renamed it as PDF_template.
I renamed the custom_css_example.php to custom_css.php
and add this line:
* {font-family: arial!important;}
What am i doing wrong?
I am using a shared host so i don't have the permissions to change php settings.
 
Did you select this template as PDF template?
There have been issues with case sensitive file names so better do a comlete GitHub update (backup first).
 
Yes i selected the custom template as pdf template. To see if that works and arial is loaded i also select this template for details view and i can see that arial is selected through the custom_css.php.
I am running fabrik 3.0.8 downloaded and installed last week. Do i have to update?
 
Thanks. With your HELP i fixed the issue!!!!
Step were:
  1. I downloaded the arial fonts from: http://www.fabrikar.com/forums/index.php?threads/new-pdf-option.26829/page-4 because i could not find arial fonts on github as you said.
  2. I upload them to dompdf/lib/fonts.
  3. I make a copy of the default template in com_fabrik/views/form/tmpl and renamed it as PDF_template.
  4. I renamed the custom_css_example.php to custom_css.php and add this line: * {font-family: arial!important;}
  5. Renamed ARIAL.TTF to ARIAL.ttf because for some reason it is case sensitive
  6. I download dompdf_font_family_cache.dist.zip from the post in step 1 and copied it to libraries/dompdf/lib/fonts
And it worked! Now i have to make my template so it will be displayed as i want.!!!
Thanks again.!
 
The only problem that exists now is the pdf that is created is 1.5MB. for some text? Do you have any clue why this is happened?
 
As far as I can see the Arial font is embedded. You'll get only some kB without the arial css.

I don't know how to prevent this. The PDF option is still work in progress, there are some restrictions/bugs coming from dompdf (e.g. tables spanning pages, float settings...)

Where did you get the dompdf library from? It is not included in the 3.0.8 download. Usually you have to update from GitHub to get it (which is including the Arial fonts with correct file names)
http://fabrikar.com/forums/index.php?wiki/update-from-github/
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top