Forums / Setup & design / ezp 4.0, problem with polish in PDF

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

ezp 4.0, problem with polish in PDF

Author Message

Marek Tryliński

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/

Piotrek Karaś

Friday 25 April 2008 7:42:30 am

Lack of good utf-8-compatible PDF libs is probably one of the reasons for which PDF view is considered deprecated:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/views/pdf

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu