[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/pdf class.ezpdf.php class.pdf.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/pdf class.ezpdf.php class.pdf.php |
Date: |
Tue, 15 Aug 2006 20:41:38 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Sigurd Nes <sigurdne> 06/08/15 20:41:38
Modified files:
inc/pdf : class.ezpdf.php class.pdf.php
Log message:
Added support for utf-8
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/pdf/class.ezpdf.php?cvsroot=phpgwapi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/pdf/class.pdf.php?cvsroot=phpgwapi&r1=1.2&r2=1.3
Patches:
Index: class.ezpdf.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/pdf/class.ezpdf.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- class.ezpdf.php 16 Mar 2006 19:24:15 -0000 1.1
+++ class.ezpdf.php 15 Aug 2006 20:41:38 -0000 1.2
@@ -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/phpgwapi/phpgwapi/inc/pdf/class.pdf.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.pdf.php 2 Jul 2006 16:25:50 -0000 1.2
+++ class.pdf.php 15 Aug 2006 20:41:38 -0000 1.3
@@ -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] phpgwapi/inc/pdf class.ezpdf.php class.pdf.php,
Sigurd Nes <=