Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5
-
None
-
None
Description
I noticed that FOP does not support scaling an image' height using percentage.
In the example below, we set the image' height to be 50% of its parent block (the expected height should be 2.5 cm; 5 cm * 0.5 = 2.5 cm). However, FOP sets the image' height exactly like its ancestor block (if we ignore alignment offset). As a matter of fact, the image' height is always resolved the same regardless of the value of attribute "height".
<fo:block-container position="absolute" height="5cm"> <fo:block> <fo:external-graphic src="image.jpg" height="50%" content-height="scale-to-fit"/> </fo:block> </fo:block-container>
Judging from the latest revision of the source code, it seems that FOP resolves the image' height using the parent containing-block-area rather than the containing-reference-area. This subtle difference makes it impossible to scale an image relatively to its parent block-container.
Any thoughts?
Thanks