vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Unable to load a specific image, other images work. #336

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
Create a PDF with content:
<img 
src="http://ajaja.co.uk/lib/barcode.php?barcode=23243&amp;format=png"></img>

What is the expected output? What do you see instead?
The same image that you would see in the browser.

What version of the product are you using? On what operating system?
0.5.2 on Linux

Please provide any additional information below.
I have tried other dynamically generated images and the DO work. For example:
<img 
src="http://www.stripegenerator.com/generators/generate_stripes.php?fore=ff0000&
amp;h=30&amp;w=20&amp;p=20&amp;back1=ffffff&amp;back2=ff0000&amp;gt=0&amp;d=0&am
p;shadow=6&amp;" width="50" height="50"></img>

works.

Original issue reported on code.google.com by spacerat...@gmail.com on 11 Aug 2011 at 2:30

GoogleCodeExporter commented 9 years ago
Here is the code used for barcode.php and my configuration. I changed the 
temporary directory from /tmp because of permission issues.

Original comment by spacerat...@gmail.com on 11 Aug 2011 at 2:38

Attachments:

GoogleCodeExporter commented 9 years ago
The issue you're encountering have been addressed for the 0.6.0 release 
(currently in beta). If you can upgrade we would recommend it.

When the extension of the source file (php in this case) doesn't match a known 
image type DOMPDF will assume a PNG image. I believe that there are some PNG 
variants that 0.5.1 could not parse, which is maybe why one image display 
correctly but not the other. If you can try other PNG variants (such as a 
32-bit PNG) maybe you'll find one that works correctly.

barcode.php appears to create an 8-bit PNG. Maybe if you change barcode.php to 
use imagecreatetruecolor() instead of imagecreate() it will output in true 
color. I haven't tried this so I don't know if it will have any other effects 
on the output.

Original comment by eclecticgeek on 11 Aug 2011 at 6:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16