willo_the_wisp Posted February 23, 2011 Share Posted February 23, 2011 Hi, I'm creating a PDF document using the FPDF library. All is fine, using a sample image that came with the library. However, I need to get the data for the PDF from a database. The data's fine - the query is performed and the data prints out as I need. However, there's one line which takes a value which is a filepath. When I put that into the following line, I get an error from FPDF: Code: $this->Image($row['imgpath'],10,10,190); Error produced: FPDF error: Image file has no extension and no type was specified: However, if I print out the value of $row['imgpath'] and manually insert it into the code as follows, it works fine: Code: $this->Image('../assets/images/products/5777A.jpg',10,10,190); I've come across this problem once before but can't for the life of me remember what the solution was. It was something to do with how I was reading the value into the code, I think. Can anyone jog my memory, please?? Quote Link to comment Share on other sites More sharing options...
willo_the_wisp Posted February 24, 2011 Author Share Posted February 24, 2011 Does anyone know about this?? Please reply if you do! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.