FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » PDF Generation with Special characters
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PDF Generation with Special characters [message #167332] Fri, 08 June 2012 15:36 Go to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
Creating a PDF does scrambles the German special letters ÄÖÜäöü (Umlaute) etc, as the UTF code is not given to the PDF generator

Solution (taken from http://www.faqboard.info/printthread.php?tid=1899&page=2) :

include/fpdf.php, look for function Cell
Add AFTER

Zitat:

if($txt!=='')
{


$txt = iconv('utf8', 'cp1252', $txt);

I tried this and it worked.

Other sources said replacing FPDF with http://www.tcpdf.org/ should work as well.


Alopezie.de - das Forum zum Thema Haarausfall

[Updated on: Fri, 08 June 2012 15:37]

Report message to a moderator

Re: PDF Generation with Special characters [message #167335 is a reply to message #167332] Fri, 08 June 2012 21:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Maybe I'm doing it wrong, but the iconv hack resulted in a blank PDF document when I tested it.
Aw: Re: PDF Generation with Special characters [message #167340 is a reply to message #167335] Sat, 09 June 2012 03:44 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 106
Registered: September 2003
Karma: 1
Senior Member
its a standard PHP function (http://phptutorial.info/?iconv), so should work
Maybe typo??


Alopezie.de - das Forum zum Thema Haarausfall
Re: Aw: Re: PDF Generation with Special characters [message #167344 is a reply to message #167340] Sat, 09 June 2012 07:58 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Got it, it's a typo in your example. Must be 'utf-8' instead of 'utf8'.

More info at http://think-robot.com/2008/09/how-to-use-special-characters-in-fpdf/
Re: Aw: Re: PDF Generation with Special characters [message #167345 is a reply to message #167344] Sat, 09 June 2012 08:07 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Committed @ http://fudforum.svn.sourceforge.net/fudforum/?rev=5509&view=rev
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3.0.4RC2 scripts/forum_login.php __ses_make_sysid() broken
Next Topic: Sort Private Messages by Name
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 07:06:30 GMT 2024

Total time taken to generate the page: 0.02538 seconds