It is currently Fri Aug 29, 2008 5:20 am

[NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese

Moderators: dam-man, willebil, tcp, Development

[NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese

Postby baijianpeng on Mon Jul 23, 2007 2:20 pm

I tried Joomla! 1.5 RC1 today on my XAMPP localserver.

It is glad to see that Joomla 1.5 now support utf-8 encoding from the root. Then, I added an article in Chinese language and again glad to see the frontend shows proper Chinese words without problem.

Next, I clicked the PDF button on the article page, and it generated a pdf file for me. But when I opened the pdf file and view it, there was no Chinese words at all. Instead, the page was full of unreadable symbols.

I think Joomla 1.5 still has some problem with Multi-bytes languages as well as utf-8 encoding.

Hope you can fix this in next version.
Last edited by Jinx on Sat Aug 25, 2007 4:55 pm, edited 1 time in total.
JoomlaGate - Chinese Joomla Users' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Joomla! Explorer
Joomla! Explorer
 
Posts: 416
Joined: Mon Mar 20, 2006 3:17 pm
Location: China

Re: PDF output shows unreadable symbols instead of proper Chinese words

Postby CoolAcid on Tue Jul 24, 2007 12:46 pm

Have you installed the Chinese language pack? PDF files are only able to reference one font - if that font doesnt' include your chars it will break the PDF. We looked at finding a general font for PDF, however to find one with all chars turned out to be in the 100's of megs (If i remember correctly). It wasn't feasible to include this. You also need to select the content language in the advanced parameters in the content edit page.
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net
User avatar
CoolAcid
Joomla! Guru
Joomla! Guru
 
Posts: 776
Joined: Wed Nov 08, 2006 1:45 am
Location: Ontario, Canada

Re: PDF output shows unreadable symbols instead of proper Chinese words

Postby mihu on Tue Jul 24, 2007 4:38 pm

I am just wondering is it possible for Joomla to host those files (fonts) somewhere, so people can download when they need to.
If it possible, this should mention in the installation guide in the future.
bento2go.com - We DO NOT sell bento !!
User avatar
mihu
Joomla! Guru
Joomla! Guru
 
Posts: 772
Joined: Mon Mar 20, 2006 8:17 am

Re: PDF output shows unreadable symbols instead of proper Chinese words

Postby CoolAcid on Tue Jul 24, 2007 5:21 pm

The PDF Fonts, No, since the code doesn't allow for it - We also couldn't find a font file with every letter - so he had decided to just go this route until an alternative was found.
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net
User avatar
CoolAcid
Joomla! Guru
Joomla! Guru
 
Posts: 776
Joined: Wed Nov 08, 2006 1:45 am
Location: Ontario, Canada

Re: PDF output shows unreadable symbols instead of proper Chinese words

Postby baijianpeng on Tue Jul 24, 2007 10:22 pm

CoolAcid wrote:Have you installed the Chinese language pack? 


I did installed the Chinese language. But it seems doesn't include any font folder for PDF function. Maybe I downloaded an old version ?

Someone had solved this problem on Joomla 1.0.x for Chinese language, yes, there was a special folder to be added into the original installation of Joomla 1.0.x.

Just wonder if this can be edited and apply to Joomla 1.5 .

Thanks for your help.
JoomlaGate - Chinese Joomla Users' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Joomla! Explorer
Joomla! Explorer
 
Posts: 416
Joined: Mon Mar 20, 2006 3:17 pm
Location: China

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby CoolAcid on Wed Jul 25, 2007 2:25 am

It's possible the lang pack admins havne't added a PDF font file.

You can upload your own font to: JPATH_SITE.DS.'language'.DS."pdf_fonts".DS (SITE/language/pdf_fonts) and add a tag to your lang page XML like this (English's): vera  (Replace 'vera' with your font name).

Then, submit this to the lang pack people to include in their package :)
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net
User avatar
CoolAcid
Joomla! Guru
Joomla! Guru
 
Posts: 776
Joined: Wed Nov 08, 2006 1:45 am
Location: Ontario, Canada

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby baijianpeng on Wed Jul 25, 2007 8:24 am

I see the pdf_fonts folder inside /language folder. There are one file called vera.php and other two files: vera.ctg.z and vera.z .

I have no idea what is the file extension .z stand for. To be frank, I only know truetype fonts with .ttf as their file extension.

How can I make an existing Windows system font into a font package for Joomla 1.5 ? Do you have any manual or guide ?

Thanks.
JoomlaGate - Chinese Joomla Users' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Joomla! Explorer
Joomla! Explorer
 
Posts: 416
Joined: Mon Mar 20, 2006 3:17 pm
Location: China

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby CoolAcid on Wed Jul 25, 2007 1:25 pm

Herm.. opps..

Yes, telling you how to make the font files would help.

http://sourceforge.net/forum/forum.php? ... _id=435311

This given an indepth detail on howto make the font files from a user perspective.

If you already have a ttf file you need to find ttf2ufm to create a .ufm file. Then once you have the ttf and ufm files you need to download the tcpdf package from http://www.tecnick.com/public/code/cp_d ... p_dp=tcpdf and run makefontuni.php to create the needed files.
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net
User avatar
CoolAcid
Joomla! Guru
Joomla! Guru
 
Posts: 776
Joined: Wed Nov 08, 2006 1:45 am
Location: Ontario, Canada

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby mihu on Wed Jul 25, 2007 3:56 pm

Should we mark this as NOT A BUG and pass those info to translation WG?
I think this is valuable info for other language user.
bento2go.com - We DO NOT sell bento !!
User avatar
mihu
Joomla! Guru
Joomla! Guru
 
Posts: 772
Joined: Mon Mar 20, 2006 8:17 am

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby baijianpeng on Wed Jul 25, 2007 10:36 pm

Yes, I now understand that this is not a bug of Joomla! 1.5 itself but a incomplete work of translation team.

Hope they will fix this soon.

Thanks for you all.
JoomlaGate - Chinese Joomla Users' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Joomla! Explorer
Joomla! Explorer
 
Posts: 416
Joined: Mon Mar 20, 2006 3:17 pm
Location: China

Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Postby Jinx on Sat Aug 25, 2007 4:54 pm

Marking as not a bug and closing report.
Johan Janssens - Lead developer
'Making good things happen'
http://www.nooku.org - content translation system for Joomla! 1.5
http://www.joomlatools.org - training, consulting and extension development
User avatar
Jinx
Joomla! Champion
Joomla! Champion
 
Posts: 6714
Joined: Fri Aug 12, 2005 12:47 am

Re: [NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese

Postby baijianpeng on Sun Aug 26, 2007 12:07 am

Good news:

I had solved this problem by successfully converted one font file into .z format font file and related php file and .ctg.z file. Now I can get proper PDF output on Chinese version of Joomla! 1.5 RC1.

If the official develope team need my font file, I can send it to you. But I am not sure if I can do it without request since the font files are as big as 3 MB.

You can read the method about how to make a PDF font for Joomla! 1.5 at :http://www.joomlagate.com/content/view/115/29/
JoomlaGate - Chinese Joomla Users' Portal

http://www.joomlagate.com
User avatar
baijianpeng
Joomla! Explorer
Joomla! Explorer
 
Posts: 416
Joined: Mon Mar 20, 2006 3:17 pm
Location: China


Return to Q&T 1.5.x Resolved

Who is online

Users browsing this forum: No registered users and 0 guests