1

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.

2

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...
Ancien pseudo : lolo

3

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.

4

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.

5

Wow Spipu t'as intérêt à te sortir les tripes pour pas te faire supplanter cheeky

6

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

7

i'm actually working on HTML2PDF V4.0 : it will based on TCPDF and will be written in PHP5
Ancien pseudo : lolo

8

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

9

Spipu (./7) :
i'm actually working on HTML2PDF V4.0 : it will based on TCPDF and will be written in PHP5

fou
Purée j'en reviens pas, ben chapeau pour ton courage hein top

10

Spipu (./7) :
i'm actually working on HTML2PDF V4.0 : it will based on TCPDF and will be written in PHP5

Will you stop your work on v3.0 and its PHP4 users?
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant

11

i will only make support for bugs, but there will no new functionality on V3
Ancien pseudo : lolo

12

i have made more than 90% smile it woks fine, and lots of things work better, like all the bar codes, the forms, ..., ...

just a little problem : resources...

V3.28 about.php      3 096.4 ms     5 497.7 Ko
V4.00 about.php      6 611.5 ms    12 663.9 Ko


Ancien pseudo : lolo

13

good to read spidu,

i'm sure you find a solution to that, problem : magic
Developer of Fusion Ticket. I ticket sale webshop using Html2pdf to generate the pdf files

14

./5 => ben voilà qui est (presque) fait, bravo, tu vas encore faire des heureux top

15

NielsNL (./13) :
good to read spidu,


i'm spipu, not spidu wink tongue
NielsNL (./13) :
i'm sure you find a solution to that, problem : magic.gif


i'm not sure... for the memory, it is juste TCPDF sad it is bigger than fpdf ! for the time, i'm on it
Ancien pseudo : lolo

16

i have change lots of things. now, we loose from 5% to 35% of time, depends on the html to convert
Ancien pseudo : lolo

17

J'ai besoin de testeurs.

est-ce que chez vous, le document suivant s'affiche correctement ? [lien enlevé]

merci smile

Ancien pseudo : lolo

18

Ça veut dire quoi « correctement » ?
Tu as un rendu de référence ?
Car j'aurais tendance à dire que chez moi il s'affiche « pas correctement » mais c'est difficile à dire wink
avatar
Le scénario de notre univers a été rédigée par un bataillon de singes savants. Tout s'explique enfin.
T'as un problème ? Tu veux un bonbon ?
[CrystalMPQ] C# MPQ Library/Tools - [CrystalBoy] C# GB Emulator - [Monoxide] C# OSX library - M68k Opcodes

19

tromb Fichier joint : B8tW (capture d'écran1.png)

C'est Okular qui a fait ça, je connais pas sa fiabilité à rendre convenablement du HTML, donc voilà grin

20

Bon bah allons y avec les screen alors tongue
Moi j'ai ça:
tromb Fichier joint : SuWj (Test PDF.PNG)
avatar
Le scénario de notre univers a été rédigée par un bataillon de singes savants. Tout s'explique enfin.
T'as un problème ? Tu veux un bonbon ?
[CrystalMPQ] C# MPQ Library/Tools - [CrystalBoy] C# GB Emulator - [Monoxide] C# OSX library - M68k Opcodes

21

houla, c pas bon ca !

ca devrait donner ca normalement :

tromb Fichier joint : wyBn (rendu.jpg)
Ancien pseudo : lolo

22

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 ^^
avatar
Le scénario de notre univers a été rédigée par un bataillon de singes savants. Tout s'explique enfin.
T'as un problème ? Tu veux un bonbon ?
[CrystalMPQ] C# MPQ Library/Tools - [CrystalBoy] C# GB Emulator - [Monoxide] C# OSX library - M68k Opcodes

23

ben dans ce cas là, un autre test sur du alpha. tu as quel rendu la dessus ? [lien enlevé]
Ancien pseudo : lolo

24

tromb Fichier joint : FVx0 (Test PDF 2.PNG)
Celui là semble marcher nickel ?
avatar
Le scénario de notre univers a été rédigée par un bataillon de singes savants. Tout s'explique enfin.
T'as un problème ? Tu veux un bonbon ?
[CrystalMPQ] C# MPQ Library/Tools - [CrystalBoy] C# GB Emulator - [Monoxide] C# OSX library - M68k Opcodes

25

ah vi, là, c'est impec, merci smile
Ancien pseudo : lolo

26

Autre test avec KPDF, toujours plus fiable que Okular : tromb Fichier joint : formulaire.pdf

Ca m'a l'air déjà beaucoup mieux. grin

(à noter comme les deux rendus sous Okular faits par GC et moi semblent diffèrer grin)

27


heu, c'est le PDF que tu as mis, pas la capture d'écran cheeky
Ancien pseudo : lolo

28

couic
Ben on attendra d'être reviendu à la maison...

29

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.
avatar
« 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#

30

XN4z

Avec Aperçu sous OS X, les cases à cocher sont invisibles et n'ont pas l'air de garder le choix (même si la souris les détecte bien)
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant