Thanks! This seemed to work, but now I'm getting this error message,
instead of my index page:
Notice (8): Array to string conversion [APP\vendors\fpdf\fpdf.php,
line 127]
FPDF error: Incorrect orientation: array
Here's the line the error is citing:
$orientation=strtolower($orientation);
if($orientation=='p' || $orientation=='portrait')
{
$this->DefOrientation='P';
$this->w=$this->DefPageFormat[0];
$this->h=$this->DefPageFormat[1];
}
elseif($orientation=='l' || $orientation=='landscape')
{
$this->DefOrientation='L';
$this->w=$this->DefPageFormat[1];
$this->h=$this->DefPageFormat[0];
}
On Mar 24, 6:44 pm, cricket <[email protected]> wrote:
> You're using the old syntax. Use App::import('Vendor', 'FPDF');
>
> If that doesn't work, try:
>
> App::import('Vendor', 'FPDF', array('file' => 'fpdf/fpdf.php'));
>
> On Mar 24, 11:20 am, butterlamb <[email protected]> wrote:
>
> > I've been trying to make fpdf work in CakePHP (http://
> > bakery.cakephp.org/articles/view/pdf-helper-using-fpdf) with no
> > success.
>
> > When I add the pdf helper to the helpers array in my controller, I get
> > the following error message in my view:
> > "Call to undefined function vendor() in...\views\helpers\fpdf.php on
> > line 2."
> > line 2 in my helper is:
> > "vendor('fpdf/fpdf');"
>
> > Would anyone happen to know why I'm getting this error?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.