Chinese Font Support
From SimIT Wiki
- This features is supported by version 0.6c or above. Others unicode is not official support yet.
1. To display chinese font in PHPJasperXML you shall get latest version of PHPJasperXML here
2. Create a jrxml file
3. For the field you want to display chinese character (Static text or text field), you shall set the PDF font name = 'uGB'
4. Create .php file with following pattern:
<?php
//include_once('class/fpdf/FPDF.php');
include_once('class/fpdf/chinese-unicode.php'); //this is one of the most obvious difference from native code
include_once("class/PHPJasperXML.inc");
include_once ('setting.php'); // a file store variable for server name, user, password, and databasename
$xml = simplexml_load_file("sample4.jrxml");
$PHPJasperXML = new PHPJasperXML("cn"); // This is 2nd obvious changes from native code
$PHPJasperXML->arrayParameter=array("parameter1"=>1, "parameter2"=>"试试万维网看");
$PHPJasperXML->xml_dismantle($xml);
$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
$PHPJasperXML->outpage("I");
?>
- You can view sample4.php from the demo to see the effect.

