Create PDF file

software development

#1

Hi All,

And thanks for all the help.

I’m very new to PHP so bare with me if I’m making a very simple question, I did try to search the forum for a answer bu t had none.

I’m trying to create a simple PDF file from a PHP page, tryed the following code that was available on the

http://www.ros.co.nz/pdf/readme.pdf

That I think is a php extension that is available on DreamHost servers?

This is the sample Hello World that I tryed…

<?php include ('class.ezpdf.php'); $pdf =& new Cezpdf(); $pdf->selectFont('./fonts/Helvetica.afm'); $pdf->ezText('Hello World!',50); $pdf->ezStream(); ?>

and I’m getting the following error:

Warning: include(class.ezpdf.php) [function.include]: failed to open stream: No such file or directory in /home/pmpg98/bridge4fun.pt/online_CC/teste.php on line 3

Warning: include() [function.include]: Failed opening ‘class.ezpdf.php’ for inclusion (include_path=’.:/usr/local/lib/php:/usr/local/php5/lib/pear’) in /home/pmpg98/bridge4fun.pt/online_CC/teste.php on line 3

Fatal error: Class ‘Cezpdf’ not found in /home/pmpg98/bridge4fun.pt/online_CC/teste.php on line 4

It seems that the class file isn’t available or that I should state the path for it, but I thought it would be available allready.

Thanks for all the answer and support and sorry for the newbie question.

Pedro Gil


#2

Have you uploaded class.ezpdf.php anywhere? We don’t distribute it; you’ll have to download it from http://www.ros.co.nz/pdf/ if you haven’t already.

EZPDF looks incredibly old, though — it was last updated in 2003. I’m not certain that it’ll even work anymore.


#3

Thank you Andrew,

I will upload the code, thought that it was part of the dreamhost PHP package.

What other library could I use to make a PDF file, I will google it to check if I can find a more recent library.

Thanks again
Pedro Gil


#4

http://stackoverflow.com/questions/560583/which-is-the-best-pdf-library-for-php


#5

Thanks a lot
Pedro Gil