Joomla!
http://forum.joomla.org/

[NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese
http://forum.joomla.org/viewtopic.php?f=235&t=193623
Page 1 of 1

Author:  baijianpeng [ Mon Jul 23, 2007 2:20 pm ]
Post subject:  [NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese

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.

Author:  CoolAcid [ Tue Jul 24, 2007 12:46 pm ]
Post subject:  Re: PDF output shows unreadable symbols instead of proper Chinese words

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.

Author:  mihu [ Tue Jul 24, 2007 4:38 pm ]
Post subject:  Re: PDF output shows unreadable symbols instead of proper Chinese words

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.

Author:  CoolAcid [ Tue Jul 24, 2007 5:21 pm ]
Post subject:  Re: PDF output shows unreadable symbols instead of proper Chinese words

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.

Author:  baijianpeng [ Tue Jul 24, 2007 10:22 pm ]
Post subject:  Re: PDF output shows unreadable symbols instead of proper Chinese words

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.

Author:  CoolAcid [ Wed Jul 25, 2007 2:25 am ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

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 :)

Author:  baijianpeng [ Wed Jul 25, 2007 8:24 am ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

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.

Author:  CoolAcid [ Wed Jul 25, 2007 1:25 pm ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

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.

Author:  mihu [ Wed Jul 25, 2007 3:56 pm ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

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.

Author:  baijianpeng [ Wed Jul 25, 2007 10:36 pm ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

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.

Author:  Jinx [ Sat Aug 25, 2007 4:54 pm ]
Post subject:  Re: [UNDER REVIEW] PDF output shows unreadable symbols instead of proper Chinese

Marking as not a bug and closing report.

Author:  baijianpeng [ Sun Aug 26, 2007 12:07 am ]
Post subject:  Re: [NOT A BUG] PDF output shows unreadable symbols instead of proper Chinese

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/

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/