VyReN Posted February 3, 2003 Share Posted February 3, 2003 Question in regards to both these contribs -- Everything works awesome with both -- Kudos to the authors! The only thing -- Is there a way to maintain the image's ratios? My images are all squished and funny. I had to modify the output_html with OSC to correct this issue -- Any idea how to do it with these contribs? Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2003 Share Posted February 15, 2003 I am currently experiencing the exact same problem! I would appreciate it if you could elaborate on how you fix the issue you have described. I have paid a developer a decent amount of cash to get this running and it still isn't (unfortunately I am not a developer). I am at my end and thought I was going to have to remove the whole thing afterall. Your explanation would be greatly appreciated! Current example: http://www.dixiegunworks.com/product_info....roducts_id=1962 Case Quote Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2003 Share Posted February 16, 2003 I am currently experiencing the exact same problem! I would appreciate it if you could elaborate on how you fix the issue you have described. I have paid a developer a decent amount of cash to get this running and it still isn't (unfortunately I am not a developer). I am at my end and thought I was going to have to remove the whole thing afterall. Your explanation would be greatly appreciated! Current example: http://www.dixiegunworks.com/product_info....roducts_id=1962 Case Quote Link to comment Share on other sites More sharing options...
VyReN Posted February 16, 2003 Author Share Posted February 16, 2003 Ummmm... They look fine to me. :) Quote Link to comment Share on other sites More sharing options...
VyReN Posted February 16, 2003 Author Share Posted February 16, 2003 I should say -- Since nobody has replied I have no idea how to fix this,... Quote Link to comment Share on other sites More sharing options...
CC Posted February 16, 2003 Share Posted February 16, 2003 As far as knew I thought this mod did not have an image size specified. If you use an image of 300x300 you get 300x300 dont you? That was my understanding. However what we did on the end was create anpther input field in admin for each product, similar to the normal image input, and call this pdf image. Then use this seperate image for PDF's only. This was the best way to control the pdf images. Quite simple to modify to also. CC. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2003 Share Posted February 16, 2003 Glen said: "I had to modify the output_html with OSC to correct this issue". My question is, did you modify the code to allow the image size you have (given you are working with all standard sized images such as 300x300) or did you modify it to adjust the image to the size allowed in the PDF? I really need a solution that will take the size allowed on the PDF and adjust the image to fit the space proportionately. Just like OSC does with thumbnails on html pages since I am working with a much larger image. In my current example, I am actually working with an image that is 400X524 pixels (pretty big). We need it that large for the detail customers want to see when they select the enlarged pic. However, as you can see from the thumbnail, it has been sized proportionately to fit the space. Is this mod doable to PDF Datasheet Maker? CC - I do not get the full image in the PDF as you have asked. I get the squeezed version Glen describes in his first post. I certainly appreciate the solution you have explained however, with our 4,500 products online, we do not want to undergo the process of resizing all of them and then uploading all of them. Can PDF datasheet maker not size an image proportionately like OSC does for thumbnails displayed in HTML? Thanks again, Case Quote Link to comment Share on other sites More sharing options...
alverman Posted February 17, 2003 Share Posted February 17, 2003 One way to work around this could be: Define the dimension that rules (es.: width) in pdf_datasheet_config.php set define('MAX_IMAGE_WIDTH', '200'); to match the dim. you want to be shown, I do not suggest to go above 200 as it would compromise the page lay-out and I would keep it equal to the smaller image width used define('MAX_IMAGE_HEIGHT','600'); set this to a dimension bigger than the max h of your pic. then in pdf_datasheet_functions.php (around line 187) replace "case" //If only Small Image Width is defined with: //If only Small Image Width is defined else if(strlen($data_array[0])>1) { $heightwidth=getimagesize($data_array[10]); $factor = $heightwidth[0]/$heightwidth[1]; $data_array[0]=$data_array[0]; $data_array[1]=$data_array[0]/$factor; $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } in pdf_datasheet_functions.php (around line 319) comment-out //$imagewidth=SMALL_IMAGE_WIDTH*PDF_TO_MM_FACTOR; //$imageheight=SMALL_IMAGE_HEIGHT*PDF_TO_MM_FACTOR; place below: $imagewidth=MAX_IMAGE_WIDTH*PDF_TO_MM_FACTOR; (I worked locally w/ your example http://www.dixiegunworks.com/product_info....roducts_id=1962 your image is 400*524 and becomes 200*262) This is the first idea that came to my mind, also I was not able to find another image to play w/ in your site (found only small gifs), but I hope this example helps. There might be other ways to make this working, time permitting I'll try to find a more flexible solution. (BACKUP :!: ) ivan Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2003 Share Posted February 18, 2003 NICE! :D Thank you for your excellent feedback. Your feedback saved this project for me. Case 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.