[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc/pdf class.ezpdf.php class.pdf.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc/pdf class.ezpdf.php class.pdf.php |
Date: |
Mon, 19 Feb 2007 13:30:07 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 07/02/19 13:30:07
Modified files:
inc/pdf : class.ezpdf.php class.pdf.php
Log message:
utf-support
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/pdf/class.ezpdf.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/property/inc/pdf/class.pdf.php?cvsroot=phpgroupware&r1=1.5&r2=1.6
Patches:
Index: class.ezpdf.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/pdf/class.ezpdf.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- class.ezpdf.php 27 Dec 2006 10:38:00 -0000 1.4
+++ class.ezpdf.php 19 Feb 2007 13:30:07 -0000 1.5
@@ -655,6 +655,8 @@
// note that the user will have had to make a font selection already or this
will not
// produce a valid pdf file.
+ $title = $this->utf2ascii($title);
+
if (!is_array($data)){
return;
}
Index: class.pdf.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/pdf/class.pdf.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- class.pdf.php 27 Dec 2006 10:38:00 -0000 1.5
+++ class.pdf.php 19 Feb 2007 13:30:07 -0000 1.6
@@ -2162,6 +2162,8 @@
* add text to the document, at a specified location, size and angle on the page
*/
function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
+ $text = $this->utf2ascii($text);
+
if (!$this->numFonts){$this->selectFont(PHPGW_APP_INC .
'/pdf/fonts/Helvetica');}
// if there are any open callbacks, then they should be called, to show the
start of the line
@@ -3078,6 +3080,17 @@
}
+function utf2ascii($text = '')
+{
+ if ($text == utf8_decode($text))
+ {
+ return $text;
+ }
+ else
+ {
+ return utf8_decode($text);
+ }
+}
} // end of class
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc/pdf class.ezpdf.php class.pdf.php,
Sigurd Nes <=