Welcome Guest, Not a member yet? Register   Sign In
Generating PDF files ezpdf
#4

[eluser]Unknown[/eluser]
I know this is a slightly old thread... But I found the solution.

addJpegFromFile requires a "file" not a "url"...

So for example, here is my code:
Code:
$image = $_SERVER{'DOCUMENT_ROOT'} . "/images/my_image.jpg";
      if (file_exists( $image))
      $CI->cezpdf->addJpegFromFile($image,x,y,w);

If you pass a URL (like an img src) it will always fail. It took me forever to figure this out, but what made it clear was when I used the file_exists() function and it always failed... I remembered "duh, it's looking for a file on the server".

I hope this helps someone.


Messages In This Thread
Generating PDF files ezpdf - by El Forum - 06-30-2010, 08:59 AM
Generating PDF files ezpdf - by El Forum - 08-03-2010, 06:09 AM
Generating PDF files ezpdf - by El Forum - 08-03-2010, 11:45 AM
Generating PDF files ezpdf - by El Forum - 08-30-2010, 05:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB