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

Home » FUDforum Development » Bug Reports » PDF Generation with Special characters
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
PDF Generation with Special characters [message #167332] Fri, 08 June 2012 11:36 Go to next message
alopezie is currently offline  alopezie   Germany
Messages: 48
Registered: September 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11:37]

Report message to a moderator

Re: PDF Generation with Special characters [message #167335 is a reply to message #167332] Fri, 08 June 2012 17:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3571
Registered: December 2004
Karma: 10
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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] Fri, 08 June 2012 23:44 Go to previous messageGo to next message
alopezie is currently offline  alopezie   Germany
Messages: 48
Registered: September 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 03:58 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3571
Registered: December 2004
Karma: 10
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 04:07 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3571
Registered: December 2004
Karma: 10
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Committed @ http://fudforum.svn.sourceforge.net/fudforum/?rev=5509&view=rev
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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 Dec 21 12:11:24 EST 2014

Total time taken to generate the page: 0.00814 seconds