PDF creation using FPDF on PHP website

I have a php website that i use FPDF to create a pdf copy of a work order.  The customer signs the work order via a mobile device when the job is finished.  FPDF is supposed to pull the image into the PDF but all it shows is a file name.  Wondering if anyone can help. I have attached a copy of a workorder showing the problem and also the php code that i use to create the pdf.  thanks.
Sean FabianIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
This seems more like a requirement for application development than a question hat has an answer.  Maybe consider posting it in E-E Gigs so you can engage a developer.  Best of luck with it, ~Ray
Julian HansenCommented:
        //$this->Image('images/captured_signature/'.$row['job_signature'],50,145, 40, 40,'PNG'); 
//        $ImgPAth='images/captured_signature/'.$row['job_signature'];
//          $ImgPAth='images/captured_signature/signature_351.jpg';
//        $this->Cell(60,60,$this->Image($ImgPAth, $this->GetX(), $this->GetY(), 45,40),0,0,'L');

Open in new window

I am not familiar with FPDF but it looks like you have commented out the code that inserts an image and replaced it with code that inserts the name.

I use MPDF (http://www.mpdf1.com/mpdf/index.php) which is a combination of FPDF and HTML2PDF. At the risk of doing an injury inducing sharp turn, have you tried creating your Work Order in HTML and then using MPDF to render it for you.
Sean FabianIT DirectorAuthor Commented:
No i have not... The whole site is written in php code.
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Julian HansenCommented:
What about the first comment in my post
it looks like you have commented out the code that inserts an image and replaced it with code that inserts the name.
Sean FabianIT DirectorAuthor Commented:
i have uncommented it and it is still doing the same  thing
Julian HansenCommented:
Here is how you are loading the cti image
$this->Cell(60,60,$this->Image('images/cti.jpg', $this->GetX(), $this->GetY(), 45,25,'JPG'),0,0,'L');

Open in new window

This is how you appear to be loading your signature

Open in new window

Why not try this
$this->Cell($w[$i],6,$this->Image($row['job_signature'], $this->GetX(), $this->GetY(), 45,25,'JPG'),0,0,'L', $fill);

Open in new window

Change the width (45) and height(25) to match the size of your signature.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sean FabianIT DirectorAuthor Commented:
what part should i leave and what part should i comment out.   i just commented out everything and put in what you suggested and still not working. I really appriciate the help.  Do you need any more info?
Julian HansenCommented:
The best approach to getting the most out of EE is to provide as much input as you can. Saying things like it does not work - is useless to us - we can't see what you see so we need something to go on.
For instance
- posting your code to show how you implemented the latest suggestion
- letting us know if the "did not work" generated an error or did it generate the wrong result
- trying to interpret what is being recommended so you can make minor adjustments to suite your environment. We cannot always give you the exact code you need (because we don't have access to your environment) - you might need to tweak it to make it work.

In your example your code was just displaying the image name. However the CTI image at the top displays fine which seems to indicate that the method you are using for the signatures is wrong.

By using the same process for implementing the CTI image on the signature it should work. If the implementation is correct and it is still not working then the problem is data.

Your PDF says the image name is signature_848.jpeg - are you sure this image exists?
There is no path before the image - maybe there needs to be one - is the extension meant to be .jpeg.
Try hard-coding the path in the FPDF command instead of using a variable - if that works then look at what is wrong with your variable. Remember paths are usually relative to the location where the landing script is run from. By landing script I mean the script that was invoked through the URL or command line. If a script includes another script in a different location - the included script assumes the location of the parent. Check your paths are correct along with the other items mentioned above and post back with what you find.
Sean FabianIT DirectorAuthor Commented:
i will try that today.  The image that the pdf pulls is different for every wo order created.   Since each signature is different.  Again, thanks for the help.   I will try those suggestions in a few hours.   Its 4am here and i need to get some rest.
Julian HansenCommented:
Since each signature is different

Yes, got that but for testing pick one that exists and test with that. When that works you can go back to using the dynamic one.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.