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.