otel Posted May 31, 2013 Share Posted May 31, 2013 I have changed the number 75 after line 4 13 times and still no change. I cant seem to find the file that I have to change I don't know where the file location is. First I changed the invoicepdf.tpl but nothing happens. here is the link to the invoice. http://www.marzi.co.za/dl.php?type=q&id=&viewpdf=1. The logo is too big. Please give me a step by step instructions including where the file is located then I can change it acording to the instructions please. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 31, 2013 Share Posted May 31, 2013 the link you supplied won't work unless we can login, so I can't see what you're seeing ! there is no pdf source file, they are created on the fly using the content of invoicepdf.tpl in your chosen template folder - so looking at your invoicepdf.tpl code... if (file_exists(ROOTDIR.'/images/Marzi-small.png')) $pdf->Image(ROOTDIR.'/images/Marzi-big.png',20,25,25); elseif (file_exists(ROOTDIR.'/images/Marzi-small.png')) $pdf->Image(ROOTDIR.'/images/logo.jpg',20,25,25); else $pdf->Image(ROOTDIR.'/images/placeholder.png',20,25,75); i'm not sure why you should check to see if one image file exists, but then use a second image file in the pdf template - that makes little sense to me... the second line would never be hit either, because you're checking that the same image file exists in the previous line. also, if you open "Marzi-small.png" image in Firefox, you get the following error... The image cannot be displayed, because it contains errors so I think the png itself is corrupt and will need to be re-uploaded - whether that corruption is causing it to use 'marzi-big.png' at its default size of 313x387px I don't know, but uploading the file again (assuming it isn't locally corrupt) might answer that. personally, I think you've over-complicated this by your filenames - I would suggest you do one of two things... either edit 'placeholder.png' in a graphics program and put your logo in there and save it as logo.png (using the default code below), or save your logo png in the dimensions you want to use it and alter the code accordingly. your 'logo.jpg' exists, so if you could fix the second line to use it, or convert it to logo.png, then that would work. if (file_exists(ROOTDIR.'/images/logo.png')) $pdf->Image(ROOTDIR.'/images/logo.png',20,25,75); elseif (file_exists(ROOTDIR.'/images/logo.jpg')) $pdf->Image(ROOTDIR.'/images/logo.jpg',20,25,75); else $pdf->Image(ROOTDIR.'/images/placeholder.png',20,25,75); although without seeing how your pdf's are looking, it's hard to advise more. 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 31, 2013 Share Posted May 31, 2013 im sure there was a pdf file you could edit pre 5.2 it seems everything has now been moved into the class folder, i just opened the three files.. i dont suggest you mess in those files those files they are very complicated, i dont consider myself a novice at php but i wouldnt want to mess with anything in them without a great deal of research. All i can really suggest is to make sure you are editing the correct template file, my search just brought up three invoicepdf.tpl files one for each of the themes installed. Also make sure you are clearing templates_c and your browsers cache, images especially are a pain in the backside if you forget to clear the browsers cache. 0 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.