I am using DOMPDF on an internationalized code and the page that
generates the html output and outputs the PDF also calls the setlocale
function to determine which language to load and if this function gets
called on the page, the PDF does not get generated.
I have found the following about it but this certainly does not help.
(not even sure if it is related)
http://code.google.com/p/dompdf/issues/detail?id=20
Any idea why this is happening? And how do I fix it?
Thank you
Sem
Helloa,
<?PHP
session_start();
@require_once("../../dompdf/dompdf_config.inc.php");
putenv("LC_ALL=".$_SESSION['lang']);
setlocale(LC_ALL, $_SESSION['lang']);
bindtextdomain("messages", "lang");
bind_textdomain_codeset('messages', 'UTF-8');
textdomain("messages");
$html .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html .= '<html xmlns="http://www.w3.org/1999/xhtml">';
$html .= '<head>';
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
$html .= '<link rel="gettext" type="application/x-po"
href="lang/'.$_SESSION['lang'].'/LC_MESSAGES/messages.po" />';
$html .= '<link rel = "stylesheet" type = "text/css"
href="css/reports.css" media="">';
$html .= '</head>';
$html .= '<body>';
$html .= 'Some Test Here';
$html .= '</body> </html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html, 'UTF-8');
$dompdf->set_paper("a4", "landscape" );
$dompdf->render();
$dompdf->stream("Management_Report.pdf");
?>
> --
> You received this message because you are subscribed to the Google Groups
> "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/ZDB8mVJXbksJ.
> To post to this group, send email to dom...@googlegroups.com.
> To unsubscribe from this group, send email to
> dompdf+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/dompdf?hl=en.
>
>
I am using the latest greatest of the dompdf. Below is the condensed
version of the code i am executing. When this code is called, it
should be prompting me to open the PDF file but it does nothing. But
the moment i remove the setlocale line, it works.
I did print out the error and here it is;
Fatal error: Interface 'IteratorAggregate' not found in
/home2/foreuni4/public_html/buyuk/dompdf/include/frame.cls.php on line
955
Thoughts?
Thanks
Sem
On 3/7/12, BrianS <eclect...@gmail.com> wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/armpjoGSZp4J.
Any thoughts on my previous email regarding the error?
Thank you
Sem
Hi Brian,Any thoughts on my previous email regarding the error?
Thank you
Sem
On 3/7/12, Sem Kurtulus wrote:
> Hi Brian,
>
> I did print out the error and here it is;
>
> Fatal error: Interface 'IteratorAggregate' not found in
> /home2/foreuni4/public_html/buyuk/dompdf/include/frame.cls.php on line
> 955
>
> Thoughts?
>
> Thanks
>
> Sem
>
Please let me know if I can assist on any testing or debugging during
this investigation process.
Sem
> --
> You received this message because you are subscribed to the Google Groups
> "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/sJ9iJwVtPsAJ.
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dompdf/-/sJ9iJwVtPsAJ.
Thank you for the guidance. The thing is that if you look at my code
below, I dont even have any turkish characters entered at this time.
just the inlcude that spits out that error.
Thoughts?
> --
> You received this message because you are subscribed to the Google Groups
> "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/JGhACMHg23wJ.
Based on Fabien's comments below, I am stuck.
What should i try to get this problem resolved. Please help !
Thank you
Sem
On 3/13/12, Fabien Ménager <phenx...@gmail.com> wrote:
> In fact, you don't even have to use any turkish character, this is the fact
> that in certain locales, "i" is not equal to a lower case "I", and
> internally, PHP lowercases class and method names and the locale interferes
> with it. This is a bug in PHP, you may need to set the locale to another
> one before using dompdf.
<?PHPsession_start();@require_once("../../dompdf/dompdf_config.inc.php");putenv("LC_ALL=".$_SESSION['lang']);setlocale(LC_ALL, $_SESSION['lang']);bindtextdomain("messages", "lang");bind_textdomain_codeset('messages', 'UTF-8');textdomain("messages");$html .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';$html .= '<html xmlns="http://www.w3.org/1999/xhtml">';$html .= '<head>';$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';$html .= '<link rel="gettext" type="application/x-po" href="lang/'.$_SESSION['lang'].'/LC_MESSAGES/messages.po" />';$html .= '<link rel = "stylesheet" type = "text/css" href="css/reports.css" media="">';$html .= '</head>';$html .= '<body>';$html .= 'Some Test Here';$html .= '</body> </html>';
setlocale(LC_ALL, 'en_US.UTF-8');
$dompdf = new DOMPDF();$dompdf->load_html($html, 'UTF-8');$dompdf->set_paper("a4", "landscape" );$dompdf->render();$dompdf->stream("Management_Report.pdf");?>
Hi,Based on Fabien's comments below, I am stuck.
What should i try to get this problem resolved. Please help !
Thank you
Sem
On 3/13/12, Fabien Ménager wrote:
> In fact, you don't even have to use any turkish character, this is the fact
> that in certain locales, "i" is not equal to a lower case "I", and
> internally, PHP lowercases class and method names and the locale interferes
> with it. This is a bug in PHP, you may need to set the locale to another
> one before using dompdf.
>
> On Tuesday, March 13, 2012 8:23:13 AM UTC+1, Sem K wrote:
>>
>> Hi Fabien,
>>
>> Thank you for the guidance. The thing is that if you look at my code
>> below, I dont even have any turkish characters entered at this time.
>> just the inlcude that spits out that error.
>>
>> Thoughts?
>>
>> On 3/13/12, Fabien Ménager wrote:
Please let me know if you guys develop something for this, i have a
feeling this is a very common use and i am suprised that PHP dev is
not doing anything about it...
in the meantime, i will set locale back to english.
Respectfully,
Sem
> --
> You received this message because you are subscribed to the Google Groups
> "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/vHwe48wDv0sJ.
Thank you Brian and Fabien !!Please let me know if you guys develop something for this, i have a
feeling this is a very common use and i am suprised that PHP dev is
not doing anything about it...in the meantime, i will set locale back to english.
Respectfully,
Sem