Hello,

    Using php v 4.2.2 with pdflib support, on apache v. 1.3, and redhat
linux 7.2.

I for some reason can not get a pdf_setfont, pdf_set_text_pos,
pdf_[anything], to work inside a function. What is going on. All the pdf
extensions work find as long as I dont try to use them inside a function
that I create.

ie:

PDF_set_text_pos($p, 80, 670);
PDF_show($p, "Requirements:");

works just fine outside of a function but if I put the same thing inside a
function like so


function help()
         {
          PDF_set_text_pos($p, 80, 670);
          PDF_show($p, "Test:");
         }

I will not get Test text to display inside the PDF document, If I change
this, so that I add a position to it, like so:

function help($position_y)
         {
          PDF_set_text_pos($p, 80, $position_y);
          PDF_show($p, "Test:");
         }

I get this error:

Warning: pdf_set_text_pos(): supplied argument is not a valid pdf object
resource in /var/www/html/form/test.php on line 16

What am I doing wrong?

Jeff





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

Reply via email to