I'm trying to create a class on php to generate report on PDF. I've ran several example found on internet but I got the same error, I've tried to run this example:
include ('class.ezpdf.php');
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica.afm');
$pdf->ezText('Hello World!',50);
$pdf->ezStream();
And I got the fallow error:
%PDF-1.3 %âãÏÓ 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R >> >> /MediaBox >> endobj 4 0 obj endobj 5 0 obj << /Creator (R and OS php pdf writer, http://www.ros.co.nz) /CreationDate (D:20100909) >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 60 >> stream xœãr Q06Ð300P075Ñ3Ò!) ún† ¦@Q…4 Ôœœ|…ðü¢œEM…,×IÌ ! endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj xref 0 9 0000000000 65535 f 0000000015 00000 n 0000000080 00000 n 0000000126 00000 n 0000000268 00000 n 0000000297 00000 n 0000000402 00000 n 0000000465 00000 n 0000000597 00000 n trailer << /Size 9 /Root 1 0 R /Info 5 0 R >> startxref 704 %%EOF PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Halifax' for '-4.0/no DST' instead in C:\wamp\www\PDF\class.pdf.php on line 546 PHP Stack trace: PHP 1. {main}() C:\wamp\www\PDF\ejemplo.php:0 PHP 2. Cezpdf->Cezpdf() C:\wamp\www\PDF\ejemplo.php:5 PHP 3. Cpdf->Cpdf() C:\wamp\www\PDF\class.ezpdf.php:60 PHP 4. Cpdf->newDocument() C:\wamp\www\PDF\class.pdf.php:76 PHP 5. Cpdf->o_info() C:\wamp\www\PDF\class.pdf.php:1078 PHP 6. date() C:\wamp\www\PDF\class.pdf.php:546
Please I need you to help me.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone.
I'm trying to create a class on php to generate report on PDF. I've ran several example found on internet but I got the same error, I've tried to run this example:
include ('class.ezpdf.php');
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica.afm');
$pdf->ezText('Hello World!',50);
$pdf->ezStream();
And I got the fallow error:
%PDF-1.3 %âãÏÓ 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R >> >> /MediaBox >> endobj 4 0 obj endobj 5 0 obj << /Creator (R and OS php pdf writer, http://www.ros.co.nz) /CreationDate (D:20100909) >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 60 >> stream xœãr Q06Ð300P075Ñ3Ò!) ún† ¦@Q…4 Ôœœ|…ðü¢œEM…,×IÌ ! endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj xref 0 9 0000000000 65535 f 0000000015 00000 n 0000000080 00000 n 0000000126 00000 n 0000000268 00000 n 0000000297 00000 n 0000000402 00000 n 0000000465 00000 n 0000000597 00000 n trailer << /Size 9 /Root 1 0 R /Info 5 0 R >> startxref 704 %%EOF PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Halifax' for '-4.0/no DST' instead in C:\wamp\www\PDF\class.pdf.php on line 546 PHP Stack trace: PHP 1. {main}() C:\wamp\www\PDF\ejemplo.php:0 PHP 2. Cezpdf->Cezpdf() C:\wamp\www\PDF\ejemplo.php:5 PHP 3. Cpdf->Cpdf() C:\wamp\www\PDF\class.ezpdf.php:60 PHP 4. Cpdf->newDocument() C:\wamp\www\PDF\class.pdf.php:76 PHP 5. Cpdf->o_info() C:\wamp\www\PDF\class.pdf.php:1078 PHP 6. date() C:\wamp\www\PDF\class.pdf.php:546
Please I need you to help me.
Thanks