On Wednesday 31 December 2003 09:29 am, Yann Larrivee wrote: > Hi i am trying to generate a PDF with PHP5 (latest cvs) and PDFLib 5.0.2 > > I have this very basic example that i took from php.net and saw the same > code on http://www.sitepoint.com/article/1225/1 > > <?php > $pdf = pdf_new(); > pdf_open_file($pdf, "philosophy.pdf"); > pdf_begin_page($pdf, 595, 842); > $arial = pdf_findfont($pdf, "Arial", "host", 1); > pdf_setfont($pdf, $arial, 10); > pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", > 50, 750); > pdf_end_page($pdf); > pdf_close($pdf); > ?> > > But the function pdf_begin_page always return this error messsage. > > > Fatal error: PDFlib error [2100] PDF_begin_page: Function must not be > called in 'object' scope in > /home/yann/public_html/test/pdf/OrderPdf.class on line 4 > Do you have permissions to write to/create philosophy.pdf? Does pdf_begin_page return TRUE or FALSE? What happens when you use "" for filename (ie create the file in memory)? > > To me this example seems right, and the function calls seems alright > according to the docummentation. > > > Anybody else have seen this probleme befor ? > > > Thanks > > Yann
-- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- "He who fights too long against dragons becomes a dragon himself; and if you gaze too long into the abyss, the abyss will gaze into you." -Nietzche -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php