Latest versions of html2pdf are not supporting unicode at all, this is somewhat a problem as we are serving a large array of customers, and need to produce documents with japanese characters, european characters, thai, etc...
The only charset we can use is UTF-8.
For information, other php-based pdf libraries have included unicode support (see dompdf) by using mbstring php extension.
Spipu Le 28/01/2010 à 14:11 Maybe, but HTML2PDF is based on FPDF, and can actually only work with it...
If i would use an other class like TCPDF, i must remade more than 50% of my lib... and i have not time and no money for this !
HTML2PDF has more than 2 years now, and more than 10.000 lines of code... it is not as simple as you think...
Never said to change backend library, but in this case how about implementing unicode support in fpdf and sending a patch to them?
I'll do it eventually (the modifications are not that huge, however there's a serious need to improve the way ufm is accessed), I was just hoping to hear about something already planned.
After some investigations, it seems adding unicode support to FPDF isn't impossible, but the lib isn't really a model of best practice in PHP.
I started coding a new PDF lib with Unicode support, and added a FPDF-compatible interface, I however noticed that HTML2PDF is directly using private elements from FPDF lib, including direct reference access to variables, which prevents correct overloading of variables for the compatibility class.
I'll have to add some patches to html2pdf for this to work (especially in some of the methods in "mypdf" part) and add handling of multiple toUnicode tables in pdf when unicode range grows bigger than what is initially expected.
hello MagicalTux,
Nice to read you are willing to create a utf ready fpdf version. Our system uses html2pdf also serving a large array of customers, that needs utf to print there reports. And i hope Spidu will work with you to inplement this into his Html2Pdf lib as well. When he does ... he will get some extra donation money from our team.
When you need some people to test drive let me know. I'm sure i can find some users to test it.
good luck
Niels
Main developer of FusionTicket
www.fusionticket.com
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files
Spipu Le 12/02/2010 à 16:11 i'm actually working on HTML2PDF V4.0 : it will based on TCPDF and will be written in PHP5
wow, ferry good news spidu.
I will ask to donate some money to you again.
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files
Spipu Le 13/02/2010 à 15:48 i will only make support for bugs, but there will no new functionality on V3
Spipu Le 18/02/2010 à 15:43 i have change lots of things. now, we loose from 5% to 35% of time, depends on the html to convert
GoldenCrystal Le 18/02/2010 à 22:30Edité par GoldenCrystal le 18/02/2010 à 23:58 Ben voilà, je ne sais pas d'où vient ton rendu, mais tu sais au moins que ça foire sous Linux avec Okular (donc ghostview ?), et sous OSX avec Aperçu (& QuickLook).
Après j'ai jamais lu de PDF avec champs éditables (les gens y pensent rarement) donc c'est peut être normal que ça ne marche pas… Même si ça me semble bizarre ^^
Spipu Le 18/02/2010 à 22:54Edité par Spipu le 30/03/2010 à 15:29 ben dans ce cas là, un autre test sur du alpha. tu as quel rendu la dessus ? [lien enlevé]
Sally Le 23/02/2010 à 14:40 Sous linux, avec acrobat reader 8.1.7 (du 10 août 2009) j'ai deux boîtes de dialogue, une qui me dit qu'il ne connaît pas helvetica et une qui me dit que ce document contient une erreur et que je dois contacter l'auteur. Ensuite ça m'écrit en bas à droite de la page que les formulaires nécessitent l'utilisation de adobe reader 9 et c'est tout moche (il n'y a pas de champs ni de boutons (ni le texte qui devrait être dedans), et il y a des rectangles pas beaux à la place des cases à cocher).
Par contre avec xpdf (version 3.02 de 2007) ça s'affiche presque comme sur ton rendu de référence, sauf que les cases à cocher sont toutes carrées (il n'y en a pas de rondes) et qu'il n'y a pas la flèche de la combo-box... et ça n'est toujours pas interactif. J'ai toujours la mention en bas à droite comme quoi « les formulaires nécessitent l'utilisation de Adobe Reader 9 » ; et il m'affiche dans la console (pas dans une boîte de dialogue) : Error: PDF file is damaged - attempting to reconstruct xref table...
et pour le sapin, avec acroread une boîte de dialogue semble apparaître mais elle disparaît toute seule immédiatement ; le sapin s'affiche bien, mais il est sur fond noir et son pied est très foncé. Avec xpdf j'ai de nouveau le même message « Error: PDF file is damaged - attempting to reconstruct xref table... » dans la console, et j'ai un rendu identique à celui posté par GoldenCrystal.

« Le bonheur, c'est une carte de bibliothèque ! » —
The gostak distims the doshes.Membrane fondatrice de la confrérie des
artistes flous.
L'univers est-il un
dodécaèdre de Poincaré ?
(``
·\ powaaaaaaaaa ! #love#