vikrambalye / dompdf

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

Images size wrong when specified in units other than pt, pixels or percent. #307

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Image size specified in cm (or any unit except for pixels, pt or %)
2.
3.

What is the expected output? What do you see instead?
Expected output is the correct size. Istead, it seems to regard all units other 
than pt, pixel or percent as pixels. 

What version of the product are you using? On what operating system?
0.6-beta2

Please provide any additional information below.
In my case, fixed by following changes:
Line 116:
Orig:      $width = (float)($width * 72) / DOMPDF_DPI;
Working:   $width = $style->length_in_pt($width);

Line 134: 
Orig:      $height = (float)($height * 72) / DOMPDF_DPI;
Working:   $height = $style->length_in_pt($height);

Original issue reported on code.google.com by denni...@gmail.com on 19 Jun 2011 at 6:50

GoogleCodeExporter commented 9 years ago
Thank you for your bug report and for the solution, this was already fixed in 
r400 with an example file and will be in the next beta.

Original comment by fabien.menager on 19 Jun 2011 at 9:02

GoogleCodeExporter commented 9 years ago

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