[WG: I18N & L10N] i18n of PDF file

DAVID ROLDAN MARTINEZ darolmar at upvnet.upv.es
Thu Mar 8 03:11:17 PST 2012


Hi Gao,

Can you create a JIRA (if you haven't done it yet) and attach the patches, please?

Thanks a lot!!!

David
________________________________________
De: i18n-bounces at collab.sakaiproject.org [i18n-bounces at collab.sakaiproject.org] En nombre de ¸ß¬B [gaojun at fudan.edu.cn]
Enviado el: mi¨¦rcoles, 07 de marzo de 2012 7:35
Para: i18n at collab.sakaiproject.org
Asunto: [WG: I18N & L10N] i18n of PDF file

Hi,

Some tools provide function of exporting PDF. Most of these are not i18n
friendly.
Some of these tools use Apache FOP to render PDF via XSLT and XSL-FO.
Yet, a pdf
with special characters (Chinese, in my case) would not shown properly.
By default,
PDF files support 14 fonts which doesn't contain Asian chars. So each
Asian chars is
replaced by '#'.

So, I think it's very important to allow administrator to set a "default
font" to show this
chars, may be an entry in sakai.properties would meet the need.

I seach the code and find 4 tools use Apache FOP: calendar, wiki,
site-manage and
sitestats. And fix site-manage and calendar tool in local repository.
Follows are the main
change:

1. Use FOP 1.0 instead of previous FOP versions (like 0.20.5). This will
bring the new feture
of detect System fonts automatically. With out this feature, admin must
compile a xml
file to represent font (like calendar tool used to be).

2. Use a dummy font "DEFAULT_FONT" as "font-family" at <fo:root> in XSL
file. This
value would be replaced by a custom value "fop.pdf.default.font" in
sakai.properties.
If this value is not set, then the default PDF font "Helvetica" will be
used. So, this change
would not influence the latin-1 users.

3. Modify the XSL file to meet FOP 1.0 which check XSL file more
strictly than previous
versions

If you have some good idea to improve this or you know some other
solution, please tell
me. After fix the four tools metioned before, I'll fire a JIRA issue to
submit my code.

[1] http://xmlgraphics.apache.org/fop/1.0/fonts.html#Base-14+Fonts

--
Gao Jun
Fudan University


_______________________________________________
i18n mailing list
i18n at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/i18n

TO UNSUBSCRIBE: send email to i18n-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the i18n mailing list