I spend some time today checking the python code in charge of the pdf creation from the HTML and images on the website.
Very neat process!
I encounter a problem with transparent images. I guess it's not only for Japanese and Chinese. I submitted a patch to Pisa.
Japanese PDF was almost working but there were some wrapping problem. I check Pisa and there is a style option for CJK in the paragraph object. Unfortunatly, I didn't find a way to pass this style attribute via CSS or HTML. So I put some code directly in Pisa to change the style option according to the font. Find the japanese generated attached.
For chinese, I had hard time find a font. And I don't read chinese... I took the two first fonts in this ubuntu package. The font packages contains a TTC file (a TT font collection). I use a tool to unpack TTC to TTF and took the first one of ukai (serif) and uming (sans) to build the chinese PDF
The same word wrapping problem appears and I didn't find a clean way to solve it yet. Doing the same trick leads to weird error : format not resolved in pdfdoc.py.
One other thing is missing, the translation of "Chapter".
Attached the current chinese handbook.
Comments
I spend some time today checking the python code in charge of the pdf creation from the HTML and images on the website.
Very neat process!
I encounter a problem with transparent images. I guess it's not only for Japanese and Chinese. I submitted a patch to Pisa.
Japanese PDF was almost working but there were some wrapping problem. I check Pisa and there is a style option for CJK in the paragraph object. Unfortunatly, I didn't find a way to pass this style attribute via CSS or HTML. So I put some code directly in Pisa to change the style option according to the font. Find the japanese generated attached.
For chinese, I had hard time find a font. And I don't read chinese... I took the two first fonts in this ubuntu package. The font packages contains a TTC file (a TT font collection). I use a tool to unpack TTC to TTF and took the first one of ukai (serif) and uming (sans) to build the chinese PDF
The same word wrapping problem appears and I didn't find a clean way to solve it yet. Doing the same trick leads to weird error : format not resolved in pdfdoc.py.
One other thing is missing, the translation of "Chapter".
Attached the current chinese handbook.
It's said that:
sans font (for screen read) should be ttf-wqy-zenhei,
and serif font (for print) should be ttf-arphic-ukai.
About word wrap problem, I don't know about the process to make pdf file, let me know, and I can ask ubuntu chinese localize group.
vanferry: The word wrap problem is with the HTML to PDF converter, not PDF itself.
lasconic: How did you create the PDFs with the correct word-wrap? Could you share or commit the patch?
@vanferry: I changed the font according to your recommandation
I will commit the PDFs and the small part of the code I changed in processHTML.py.
Regarding the patch to PISA, I created an issue in their bug tracker. The patch is attached.
The other patch for transparent image is here.
@david : how did you handle transparent images ?
The chinese and japanese pdf are commited.
http://mscore.svn.sourceforge.net/viewvc/mscore/branches/mscore-0-9-6/m…
http://mscore.svn.sourceforge.net/viewvc/mscore/branches/mscore-0-9-6/m…
And exposed on the handbook pages for download:
用户手册
ハンドブック
And marking this issue as fixed. Great work!
Thank you for your hard work!
Automatically closed -- issue fixed for 2 weeks with no activity.