Spipu Le 25/09/2008 à 11:30 On the line 1216 of html2pdf.class.php, try to change this :
$txt = html_entity_decode($txt, ENT_QUOTES, 'ISO-8859-15');
and tell me if it's working
Lumpy Le 26/09/2008 à 09:40 Thanks, I'm trying it, and telling if it works.
Salut,
Moi j'avais un probleme similaire avec les lettres allemands telque (ä, ö,ß...) et j'ai ecrit une fonction qui les remplace voila l'exemple:
function samrty_postfilter_cleanHTML($tpl, &$mysmarty)
{
$suchmuster[0] = '/\s\s+/';
$ersetzung[0] = ' ';
$suchmuster[2] = '/ö/';
$ersetzung[2] = 'ö';
$suchmuster[3] = '/ä/';
$ersetzung[3] = 'ä';
$suchmuster[7] = '/ß/';
$ersetzung[7] = 'ß';
........
return preg_replace($suchmuster, $ersetzung, $tpl);
}
je ne sais si sa vous aide mais voila ma solution qui fait ce que je veu en tou cas
I have got a problem, a create font with polish letter (tahomapl.php and tahomapl.z, arialpl.php and arialpl.z) and i don't know how to use it.
If I use font-family: tahomapl i've got an error - FPDF error: Undefined font: tahomapl. What did I do wrong?
I read this topic but this doesn't work. I created this fonts with iso-8852-2 codepage.
I copy the arialpl.php, arialpl.z, arialpl.afm into the _fpdf/fonts folder and if i put code line
$pdf->AddFont('arialpl');
i've got
Fatal error: Call to undefined function: addfont() in E:\WWW\chlist\html2pdf\exemples\ch.php on line 48
What should I do?
Spipu Le 09/10/2008 à 13:08 the addfont methodis in the fpdf class, not in the html2pdf class
try this :
$html2pdf = new HTML2PDF(...)
$html2pdf->pdf->AddFont(...)
Ok it's better, but now I've got this:
Warning: addfont(E:\WWW\chlist\html2pdf\_fpdf/font/tahomapl.php) [function.addfont]: failed to open stream: No such file or directory in E:\WWW\chlist\html2pdf\_fpdf\fpdf.php on line 467
Warning: addfont() [function.include]: Failed opening 'E:\WWW\chlist\html2pdf\_fpdf/font/tahomapl.php' for inclusion (include_path='.;c:\php4\pear') in E:\WWW\chlist\html2pdf\_fpdf\fpdf.php on line 467
FPDF error: Could not include font definition file
ok my fault, i've got another name of font... Now adding font works great, but i still have message : FPDF error: Undefined font: arialpl
End of my code is:
<div style="vertical-align: top; width: 60%; font-family: arialpl">ąęśćźżłó ĄĘŚĆŹŻŁÓ</div>
</page>
<?php
$content = ob_get_clean();
require_once(dirname(__FILE__).'/../html2pdf.class.php');
$pdf = new HTML2PDF('P','A4','en');
$pdf->pdf->AddFont('arialpl');
$pdf->pdf->SetDisplayMode(100);
$pdf->WriteHTML($content, isset($_GET['vuehtml']));
$pdf->Output();
?>
Spipu Le 09/10/2008 à 19:08 try to use it only with fpdf, not with html2pdf, to see if the pb is comming from html2pdf or fpdf.
if using the font dont works with fpdf, ask you question on the forum of fpdf.org