Friday 25 April 2008 5:40:00 am
there is a different libs for generating pdf in ezp 4.0, and this: http://ez-publish.pl/aktywnosc/polonizacja/pdf_z_polskimi_znakami obviously doesnt work i tried everything in this code:
$httpCharset = eZTextCodec::internalCharset();
$outputCharset = $config->hasVariable( 'PDFGeneral', 'OutputCharset' )
? $config->variable( 'PDFGeneral', 'OutputCharset' )
: 'iso-8859-1';
$codec = eZTextCodec::instance( $httpCharset, $outputCharset );
// Convert current text to $outputCharset (by default iso-8859-1)
$text = $codec->convertString( $text );
i also used iconv function, every time i tried to download pdf i got funny chars not polish ones of course i cleared cache i changed .font files, replaced the name
function createPDF( $paper = 'a4', $orientation = 'portrait' )
{
$this->PDF = new eZPDFTable( $paper, $orientation );
$this->PDF->selectFont( 'lib/ezpdf/classes/fonts/Helvetica' );
eZDebug::writeNotice( 'PDF: File created' );
}
here - the font changed but problem with encoding didnt i also tried to change ini setting for now, database in utf8, as well as ezp any ideas? that would be lovely if it could work "out of the box" in 4.1
--
http://trylik.pl/kategorie/ez-publish/
|