Chinese translation report export to pdf display "???"

Chinese translation report export to pdf display "???"

kaykay Posts: 1Questions: 0Answers: 0
edited January 2014 in DataTables 1.9
I have few language for my report. However, when in Chinese simplified, the pdf that been export shows "???" in all the header and footer. Anyone has idea how to fix this?

The way I did is echo the php translation key into the javascript. It is working on the report that being generated and display on browser. However, not on the exported pdf file report.
Example aoColumns:
"aoColumns": [
{ "sTitle": "<?php echo $lang['report-card number'];?> ", "mData": "membership", "sType": "string", "bSearchable": false, sDefaultContent: "n/a", "bSortable":false},
{ "sTitle": "<?php echo $lang['report-registration date'];?>", "mData": "reg_date", "sType": "string", "bSearchable": false, sDefaultContent: "n/a", "bSortable":false},
{ "sTitle": "<?php echo $lang['report-email'];?> ", "mData": "reg_email", "sType": "string", "bSearchable": false, sDefaultContent: "n/a", "bSortable":false},
],

Example my header and footer:

<?php echo $lang['card number'];?>
<?php echo $lang['report-registration date'];?>
<?php echo $lang['report-email'];?>

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Search for "utf8 pdf" - there are loads of discussions about this:

    http://datatables.net/forums/discussion/6680/tabletools-utf-8-in-pdf-format/p1
    http://www.datatables.net/forums/discussion/3762/how-to-export-to-pdf-with-utf-8-for-hebrew-table/p1
    http://datatables.net/forums/discussion/comment/45449

    Allan
This discussion has been closed.