Jump to content
Sign in to follow this  
kiamaru

Erreur ouverture fichier PDF (facture)

Recommended Posts

Bonjour

lorsque j'essaie de voir ma facture en pdf, j'ai cette erreur..

Notice: iconv() [function.iconv]: Detected an illegal character in input string in /var/www/vhosts/xxxxxxx.com/httpdocs/classes/Tools.php on line 703
FPDF error: Some data has already been output, can't send PDF file

comment regler ca?

merci

Share this post


Link to post
Share on other sites

Le module iconv est une extension PHP. Son activation a donc lieu lors de la compilation de PHP. Donc tu as dû modifier quelque chose, non ?
Peux tu mettre la partie de ton fichier Tools.php ici ? car tu as un souci dans l'enclenchement de la tamporisation de sortie...

Share this post


Link to post
Share on other sites

/**
* Generate date form
*
* @param integer $year Year to select
* @param integer $month Month to select
* @param integer $day Day to select
* @return array $tab html data with 3 cells :['days'], ['months'], ['years']
*
*/
static public function dateYears()
{
for ($i = date('Y') - 10; $i >= 1900; $i--)
$tab[] = $i;
return $tab;
}

static public function dateDays()
{
for ($i = 1; $i != 32; $i++)
$tab[] = $i;
return $tab;
}

static public function dateMonths()
{
for ($i = 1; $i != 13; $i++)
$tab[$i] = date('F', mktime(0, 0, 0, $i, date('m'), date('Y')));
return $tab;
}

static public function hourGenerate($hours, $minutes, $seconds)
{
return implode(':', array($hours, $minutes, $seconds));
}

static public function dateFrom($date)
{
$tab = explode(' ', $date);
if (!isset($tab[1]))
$date .= ' ' . Tools::hourGenerate(0, 0, 0);
return $date;
}

static public function dateTo($date)
{
$tab = explode(' ', $date);
if (!isset($tab[1]))
$date .= ' ' . Tools::hourGenerate(23, 59, 59);
return $date;
}

static public function getExactTime()
{
return time()+microtime();
}

static function strtolower($str)
{
if (function_exists('mb_strtolower'))
return mb_strtolower($str, 'utf-8');
return strtolower($str);
}

static function strlen($str)
{
if (function_exists('mb_strlen'))
return mb_strlen($str, 'utf-8');
return strlen($str);
}

static function strtoupper($str)
{
if (function_exists('mb_strtoupper'))
return mb_strtoupper($str, 'utf-8');
return strtoupper($str);
}

static function ucfirst($str)
{
$str[0] = self::strtoupper($str[0]);
return $str;
}


static public function orderbyPrice(&$array,$orderWay)
{
foreach($array as &$row)
$row['price_tmp'] = Product::getPriceStatic($row['id_product'], true, ((isset($row['id_product_attribute']) AND !empty($row['id_product_attribute'])) ? intval($row['id_product_attribute']) : NULL), 2);
if(strtolower($orderWay) == 'desc')
uasort($array,"Tools::cmpPriceDesc");
else
uasort($array,"Tools::cmpPriceAsc");
foreach($array as &$row)
unset($row['price_tmp']);
}

/**
* Compare 2 price to sort Categories by price
*
* @param integer $a
* @param integer $b
* @return bool
*/

static public function cmpPriceDesc($a,$B)
{
return ($a['price_tmp'] < $b['price_tmp']) ? 1 : -1;
}

static public function cmpPriceAsc($a,$B)
{
return ($a['price_tmp'] < $b['price_tmp']) ? -1 : 1;
}

static public function iconv($from, $to, $string)
{
if(function_exists("iconv"))
return iconv($from, $to, $string);
$converted = htmlentities($string, ENT_NOQUOTES, $from);
$converted = html_entity_decode($converted, ENT_NOQUOTES, $to);
return $converted;
}

}

?>

c'est bon?

Share this post


Link to post
Share on other sites

Euh là j'ai du mal à cibler la partie concernée par ton problème (joint ton fichier en pièce attachée ce sera plus simple).
C'est quelle version de PS ?

Share this post


Link to post
Share on other sites

Oups désolé je n'ai pas eu l'occasion encore de me pencher sur votre problème, si j'ai un peu de temps aujourd'hui (fin de journée) je regarderai, mais si d'autres ont la réponse ils n'hésiteront pas à vous éclairer avant ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More