Simple quote changed to question mark

Author Message

Pierre SCALFATI

Thursday 17 September 2009 9:11:06 am

Hello,

I'm using pdf generation and when I try to display the pdf version of a content article, all my simple quotes are changed to question mark character "?".

I'm using a 4.0 EZP version and in my pdf.ini.append.php, I've the following:

[PDFGeneral]

Format=A4
Orientation=portrait
TopMargin=80
BottomMargin=100
LeftMargin=30
RightMargin=30
OutputCharset=iso-8859-1

...

I tried UTF8 encoding but it doesn't work. The text to display is French, can someone help me on this problem, please ?

Many thanks

André R.

Thursday 17 September 2009 1:07:47 pm

The pdf code does not support utf-8, that's why it's deprecated.
It comes from the php functions it uses.

There is a project somewhere that works with utf-8, search for pdf on projects.ez.no and you'll probably find it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Łukasz Serwatka

Thursday 17 September 2009 1:47:15 pm

There are patches in the public issue tracker which relay on iconv charset conversion. But still, without hacking that is not possible.

All in all it is better just use one of the contributions:
http://projects.ez.no/paradoxpdf

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Pierre SCALFATI

Friday 18 September 2009 1:07:22 am

Hi everybody,

Many thanks first for your replies. I looked at paradoxpdf solution but I must admit that I'm not very keen on the fact to use JRE or other java plugins or virtual machines on my server. Is there any workaround solution to make standard EZP pdf work very easily ?

Lucasz you spoke of "hacking", can you be more precise ?

Thank you all.

Pierre SCALFATI

Friday 18 September 2009 7:00:51 am

Hello,

FINALLY, after having spent so many time to try to fix this simple quote problem, I found something very easy that fixes the bug. Everything is in the pdf.ini.append.php.

You must specify this :


[PDFGeneral]
OutputCharset=Windows-1252

Yes, as strange as it could seem, this fixed all the encoding problems I had and even my bullets are now displayed in my pdf file...

Cheers.

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 30 2025 21:42:03
Script start
Timing: Jan 30 2025 21:42:03
Module start 'layout'
Timing: Jan 30 2025 21:42:03
Module start 'content'
Timing: Jan 30 2025 21:42:03
Module end 'content'
Timing: Jan 30 2025 21:42:03
Script end

Main resources:

Total runtime0.0237 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1484151.2109
Module start 'layout' 0.00520.0040 739.3594220.6875
Module start 'content' 0.00930.0128 960.04691,001.8984
Module end 'content' 0.02210.0016 1,961.945333.9922
Script end 0.0237  1,995.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002711.5458140.0002
Check MTime0.00114.7784140.0001
Mysql Total
Database connection0.00083.399810.0008
Mysqli_queries0.002611.070230.0009
Looping result0.00000.059310.0000
Template Total0.00114.810.0011
Template load0.00093.677310.0009
Template processing0.00031.092010.0003
Override
Cache load0.00062.420410.0006
General
dbfile0.00093.837280.0001
String conversion0.00000.030240.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