1

Hi there!

I've a problem with the HTML2PDF engine (vers. 4.01; UTF8-compatible) embedded in the FusionTicket-system.
If a Safari- or IE-User (Firefox works fine! smile ) would like to finish an order, he gets the Message "ERROR : language code incorrect." Normally the engine creates an email with an automatic generated pdf-attachment at this point. I've located the error-message in the html2pdf.class.php-file:

"echo 'ERROR : language code <b>'.$langue.'</b> unknown.<br>';

Any solutions how I get my ticket-system operable for IE- and Safari-users? Do I need to change the language somewhere?

Thanks!

2

As it is used in FusionTicket, you have to ask you question on there forums wink
Ancien pseudo : lolo

3

I see your point. smile
Because it's a html2pdf error message I thought, let's try it in the experts-forum. wink

Maybe somebody is able to tell me what the message exactly mean? Where is the bug in my code located? What is this error message for? Is there a problem in my general-html2pdf-(language)-settings? Or is the bug in the html-code for the pdf-file?

Sorry for my questions, but I'm still hoping that a little change in the language-settings of html2pdf will solve my problem. Thanks.

4

it is because there is no langage code on the 3rd parameter of HTML2PDF
Ancien pseudo : lolo

5

Thank you for your answer. Unfortunately I didn't no which file do you mean. Where exactly I find this 3rd parameter? Maybe you are so kind and post a filename and a piece of the needed code (as an example).

6

Well, I've located my input-file for the engine: mypdf.class.php

The "default" code is:

class MyPDF extends TCPDF
{
protected $footer_param = array();
protected $transf = array();

public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false)
{
parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
$this->SetCreator(PDF_CREATOR);
$this->SetAutoPageBreak(false, 0);
$this->linestyleCap = '2 J';
$this->setPrintHeader(false);
$this->jpeg_quality=90;
$this->SetMyFooter();
}

public function SetMyFooter($page = null, $date = null, $heure = null, $form = null)
{
$page = ($page ? true : false);
$date = ($date ? true : false);
$heure = ($heure ? true : false);
$form = ($form ? true : false);

$this->footer_param = array('page' => $page, 'date' => $date, 'heure' => $heure, 'form' => $form);
}

public function Footer()



And it's true, there is no language setting! How can I integrat it? I've tried this without success:

class MyPDF extends TCPDF
{
protected $footer_param = array();
protected $transf = array();

public function __construct($orientation='P', $unit='mm', $format='A4', $langue='fr', $unicode=true, $encoding='UTF-8', $diskcache=false)
{
parent::__construct($orientation, $unit, $format, $langue, $unicode, $encoding, $diskcache);
$this->SetCreator(PDF_CREATOR);
$this->SetAutoPageBreak(false, 0);
$this->linestyleCap = '2 J';
$this->langue = strtolower($langue);
$this->setPrintHeader(false);
$this->jpeg_quality=90;
$this->SetMyFooter();
}

public function SetMyFooter($page = null, $date = null, $heure = null, $form = null)
{
$page = ($page ? true : false);
$date = ($date ? true : false);
$heure = ($heure ? true : false);
$form = ($form ? true : false);

$this->footer_param = array('page' => $page, 'date' => $date, 'heure' => $heure, 'form' => $form);
}

public function Footer()

7

ti is not in myPdf, but directly in the HTML2PDF class
Ancien pseudo : lolo

8

Thank you for your effort and your patience Spidu.
So it's a missing language setting in the html2pdf.class.php. Can you - or somebody else - tell me where this language setting is usually located in this file (because I'm a beginner it's hard to me to find the location of some missing code) and how the code looks like?

Thanks in advance!

9

like i say on ./4
Spipu (./4) :
it is because there is no langage code on the 3rd parameter of HTML2PDF


Ancien pseudo : lolo

10

Hi Spipu,
(sorry for the "Spidu" in my last post)

as a matter of course I recognized your post with the 3rd parameter hint. But believe me when I tell you that I don't even know what a parameter is! sad And even if I would know it and I'll be able to find the exact position of the missing code, I wouldn't know what code is missing. Any suggestions?

Maybe you can explain me the part of the code whereby I'll identify a parameter. So I can count up to the third one. Or you'll be so kind and take a look at the code of my html2pdf.class.php-file!? Unfortunately it's to big to post it here.

I'm still hoping to solve this language problem. smile

11

As told in ./ the pb you have it in the use of HTML2PDF by FusionTicket.

so go on thier forum for asking help, because the pb is with fusionticket
Ancien pseudo : lolo