1

Dear Sir,
I want use html2pdf to translate html with Chinese language to pdf. I try many times, but it still display wrong character. Can you give me a detail guide how translate Chinese pdf with html2pdf? Better give me a php sample.

Waiting for your answer. Thanks.

2

The html2pdf version that I used is V4.03.

3

Check that the font you're using includes Chinese characters.
If you need help with fonts in html2pdf : http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:font
avatar
— Zeroblog —

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

4

Also, check that the Encoding value is correct : http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:accueil
avatar
— Zeroblog —

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

5

Thanks Zerosquare,
I found the change log in V4.02, It said: conversion of the language files in CSV, moving in the "locale" directory. Adding a specific class to manage locals.
Can you tell me how to create the chinese csv file?

6

Sorry, I don't know enough about HTML2PDF to answer. Spipu (the author of HTML2PDF) will probably be able to help you today or tomorrow smile
avatar
— Zeroblog —

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

7

Thanks Zerosquare's help. It's a good news.
I'll waiting for Spipu. Hope Spipu can answer my question.

8

the locals are just for some translations. look at the "locale" folder, and the file en.csv for a example. you have to translate the file, and create ch.csv

but it will not display the good chars if you don't use a Chinese font.

in first, you have to build a font, and to use it directly with TCPDF (html2pdf use TCPDF).
Ancien pseudo : lolo