i'm unable to print czech characters. I'm using HTML2PDF v3.18
example:
html page contain: Žlica Čizvedèna
It's viewed right on browser (with doctype/head/body)
PDF output contains: (from html without doctype/head/body and iconv to cp1252 all text)
- - online: Žlica ?izvedèna
- - on localhost: Žlica Cizvedèna
Note, in the pdf i can't print right the "Č"...
Any ideas?
Spipu Le 06/03/2009 à 13:46 have you tried to use a specific font ?
I've tried with Arial, Helvetica, Times, Courier...
But i'm unable to add other fonts. I've tried, for example, with:
$html2pdf = new HTML2PDF('P','A4','it', array (mL, MT, MR, MB));
require('html2pdf_v3.18/_fpdf/font/makefont/makefont.php');
$html2pdf->pdf->AddFont('helvetica'); // <- it work
$html2pdf->pdf->SetFont('helvetica'); // <- it work
// MakeFont('calligra.ttf','calligra.afm'); // <- i don't tried this, because i'm unable to find any .afm file anywhere...
however, the following don't work:
// $html2pdf->$pdf->AddFont('times','','times.php'); // <- get error "FPDF error: Could not include font definition file"
// $html2pdf->SetFont('times'); // <- get error "Fatal error: Call to undefined function: setfont()"
p.s.: i've tried with Times and Times it's seem on PDF... even the AddFont('times... get error... i think this is strange, or i'm ignore something?...
I've tried ALL encoding (not only iconv to cp1252), but nothing...
On the tutorial it seems that i must use MakeFont to create a definition file, it's right?...
Anywhere, ...
$html2pdf->$pdf->AddFont('times','','times.php'); // <- get error "FPDF error: Could not include font definition file"
it don't work, even times.php esists on font folder, ...so i fear it don't work also with definition file created with makefont...
It don't help me. I'm unable to add fonts...
For example, i tried to use helveticab... (it's included on font folder: "helveticab.php")
on the html:
<span style="font-family:helveticab; color:#000000;">
some text
</span>
1) without any change on php:
the result is "FPDF error: Undefined font: helveticab"
2) with change in the php:
method a:
$html2pdf->AddFont('helveticab');
$html2pdf->SetFont('helveticab');
the result is "FPDF error: Could not include font definition file"
method b:
$html2pdf->pdf->AddFont('helveticab');
$html2pdf->pdf->SetFont('helveticab');
the result is "FPDF error: Could not include font definition file"
method c:
using AddFont('helveticab','','helveticab.php'), referring to "->pdf" or not...
the result is "FPDF error: Could not include font definition file"
if i can't neither add font already provided, make a specific font is useless...
I'm desperate...