Thanks, it was a permission issue. 

Yann

On Wed, 2003-12-31 at 11:13, Evan Nemerson wrote:
> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to