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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 00:26:36
Script start
Timing: Jan 31 2025 00:26:36
Module start 'layout'
Timing: Jan 31 2025 00:26:36
Module start 'content'
Timing: Jan 31 2025 00:26:36
Module end 'content'
Timing: Jan 31 2025 00:26:36
Script end

Main resources:

Total runtime0.0217 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.2344151.2109
Module start 'layout' 0.00550.0038 739.4453220.6875
Module start 'content' 0.00930.0108 960.1328997.9297
Module end 'content' 0.02020.0015 1,958.062533.9922
Script end 0.0216  1,992.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002712.2994140.0002
Check MTime0.00114.8925140.0001
Mysql Total
Database connection0.00073.369510.0007
Mysqli_queries0.002511.650230.0008
Looping result0.00000.064910.0000
Template Total0.00114.910.0011
Template load0.00083.803110.0008
Template processing0.00021.080610.0002
Override
Cache load0.00062.570610.0006
General
dbfile0.00031.218280.0000
String conversion0.00000.037440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs