Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8351463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:38:12+00:00 2026-06-09T08:38:12+00:00

I am fetching the image from the database and the image folder. now if

  • 0

I am fetching the image from the database and the image folder.

now if i dont have the image in folder, it is giving me error:

FPDF error: Missing or incorrect image file: images/Photo/a.jpg

I am sorting the images from the folders according to the mysql database image field.

Now what i want is , if there is no image in the folder or if the image field is null, it should not throw me this error. Rather show me the default image which is already there in the folder.

The code i am using is :

    $pict=$row['pict'];
    $image1 = "images/Photo/$pict";
    $pdf->SetX($xaxis);
    $xaxis=$xaxis-55;
    $yaxis=$yaxis+7;

    $pdf->Cell(0,0,$pdf->Image($image1,$xaxis,$yaxis,25,29),0,0,'L',0);
    $sign=$row['sign'];
    $image2= "images/Signature/$sign";
    $yaxis=$yaxis+35;
    $pdf->Cell(0,0,$pdf->Image($image2,$xaxis,$yaxis,20,0),0,0,'L',0);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:38:14+00:00Added an answer on June 9, 2026 at 8:38 am

    Okay. I have done it.

    All i was supposed to do was:

        $pict=$row['pict'];
    
        //$xaxis=43';
    
        $pdf->SetX($xaxis1);
    
        $pdf->Cell(22,80,'-'.$fia2.' '.$sa,0,0,'L',0);
        if (empty($pict))
        {$image1="images/Photo/blank.jpg";}
        else {$image1 = "images/Photo/$pict";}
        $pdf->SetX($xaxis);
        $xaxis=$xaxis-55;
        $yaxis=$yaxis+7;
    
        $pdf->Cell(0,0,$pdf->Image($image1,$xaxis,$yaxis,25,29),0,0,'L',0);
        $signs=$row['sign'];
        if (empty($signs))
        {$image2="images/Signature/blank.jpg";}
        else {$image2 = "images/Signature/$signs";}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a image gallery in WordPress, images are fetching from database and
I have a UIViewController and in that controller, i am fetching an image from
I have images stored in my database, when fetching these images I wish to
Fetching data from database into LisFragment. I need to use this ListFragment file content
I've written a MIDlet that does several advanced things: fetching images from the web,
I am fetching Image and Text for GridView from a webservice, so its takes
I have java class with a method which gets an image from a website:
Hi i am getting the following exception while fetching the image from server. I
I'm fetching data (images, 200-400kb) from WCF service to Silverlight client and notice that
I have a site, where I load a list of images (thumbnails) from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.