Universal Data Exporter PHP Support Product Page

tFPDF error: mbstring extension is not available

Asked 03 Aug 2011 04:18:44
1
has this question
03 Aug 2011 04:18:44 Phil Boyle posted:
Hi
I created a very simple table of one row and tried pdf export and excel export the PDF export sent me this error:tFPDF error: mbstring extension is not available

The excel export worked fine. I have the most recent version of the extension, server has php5 and I have have dw cs3. The code is below.
Thanks




<script type="text/javascript" src="ScriptLibrary/json2.js"></script>
<script type="text/javascript" src="ScriptLibrary/gridExport.js"></script>
<script type="text/javascript">
<!--
//-->
</script>
<script type="text/javascript">
<!--
function generateJSON(tableID, exportType, action, styleArr) { //v 1.13
//Universal Data Exporter PHP Behavior
var table = document.getElementById(tableID);
var rowNodes = table.getElementsByTagName("tr";

var toJSONTable = new Object();
toJSONTable.page = 1;
toJSONTable.total = rowNodes.length;
var rowsArr = new Array();
var hiddenArr = new Array();
toJSONTable.colCount = 0;
for (i = 0; i < rowNodes.length; i++)
{
var maxCols = 0;
var rowObj = new Object();
rowObj.id = (i +1);
var cellNodes = rowNodes.item(i).getElementsByTagName("td";
if (cellNodes.length > 0)
{
cellsArr = new Array();
for (j = 0; j < cellNodes.length; j++)
{
if (isGrid(tableID))
{
if (cellNodes.item(j).style.display != "none"
{
hiddenArr[j] = false;
maxCols++;
cellsArr.push(cellNodes.item(j).innerHTML);
}
else
{
hiddenArr[j] = true;
}
}
else
{
maxCols++;
cellsArr.push(cellNodes.item(j).innerHTML);
}
}
if (maxCols > toJSONTable.colCount)
{
toJSONTable.colCount = maxCols;
}
rowObj.cell = cellsArr;
rowsArr.push(rowObj);
}
}
toJSONTable.rows = rowsArr;
if (isGrid(tableID))
{
var heds = $('#' + tableID).parent().siblings(".hDiv".get(0);
var headerNodes = heds.getElementsByTagName("th";
var heArray = new Array();
for (i = 0; i < headerNodes.length; i++)
{
if (headerNodes.item(i).style.display != "none"
{
heArray.push(headerNodes.item(i).innerHTML);
}
}
toJSONTable.headers = heArray;
}
else
{
var headerNodes = table.getElementsByTagName("th";
if (headerNodes.length > 0)
{
var headerArr = new Array();
for (i = 0; i < headerNodes.length; i++)
{
headerArr.push(headerNodes.item(i).innerHTML);
}
toJSONTable.headers = headerArr;
}
else
{
toJSONTable.headers = new Array();
}
}
var myForm = document.createElement("form";
var hidden = document.createElement("input";
var hidden2 = document.createElement("input";
var hidden3 = document.createElement("input";
hidden.setAttribute('type', 'hidden');
hidden.setAttribute('value', JSON.stringify(toJSONTable) );
hidden.setAttribute('name', "JSONstring";
hidden2.setAttribute('type', 'hidden');
hidden2.setAttribute('value', exportType );
hidden2.setAttribute('name', "exportType";
hidden3.setAttribute('type', 'hidden');
hidden3.setAttribute('value', JSON.stringify(styleArr) );
hidden3.setAttribute('name', "markup";
myForm.appendChild(hidden);
myForm.appendChild(hidden2);
myForm.appendChild(hidden3);
myForm.setAttribute('name','dynaForm');
myForm.setAttribute('id','dynaForm');
myForm.method = "POST";
myForm.action = action;
myForm.target = "_self";
document.body.appendChild(myForm);
myForm.submit();
}
//-->
</script>



<table width="500" border="1" id="table1" >
<tr><td>one</td><td>two</td><td>three</td></tr>
</table>
<a href="#" onClick="generateJSON('table1','PDF','ScriptLibrary/udeJSON.php',[false,'arial',12,'#FF0000','#33FF99',false,false,'arial',12,'#000000',false,false,'#FFFF66',0.3,'#000000',10,true,'P',false,'Title','arial',12,'#000000',false,false,'L','L',true,'output',false, ,true,true,'#FFFFFF'])">PDF</a>


<a href="#" onClick="generateJSON('table1','Excel','ScriptLibrary/udeJSON.php',[false,'arial',12,'#FF0000','#33FF99',false,false,'arial',12,'#000000',false,false,'#FFFF66',0.3,'#000000',10,true,'output',false, ,true,'#FFFFFF',0])">Excel</a>

Replies

Replied 29 Aug 2011 13:06:54
29 Aug 2011 13:06:54 Miroslav Zografski replied:
Hello Phil,

Please, contact your hosting provider and check if the mbstring extension for PHP is installed on their server.

If you own the server check this link:
www.electrictoolbox.com/mbstring-php-extension-not-found-phpmyadmin/
Replied 16 May 2012 23:20:12
16 May 2012 23:20:12 Phil Boyle replied:
I've had this problem again .I never did get it working. My hosting company says the mbstring extension for PHP is installed . Any suggestions.
Thanks
Replied 26 Nov 2024 11:27:09
26 Nov 2024 11:27:09 User  replied:
If you're looking for top-rated healthcare professionals nearby, bestdoctornearme.com is the perfect tool to help you find the best doctors near you. Whether you need a general practitioner or a specialist, this website makes it easy to connect with highly rated medical professionals in your area!
Replied 19 Dec 2024 07:31:16
19 Dec 2024 07:31:16 User  replied:
Subway Surfers let players explore dynamic subway landscapes, combining fast reflexes with strategic power-ups for endless fun.

Reply to this topic