I want to right align a proportionally scaled image, on a page in the report. Seems like images are always aligned left in their bounding box.
The image however, is dynamically assigned. So no, I can't just position the image 开发者_开发技巧in the right position.
All ideas welcome :)
It's not possible.
However, you can dynamically set the padding-left value.
Doing that correctly is a pain, though.
Obtain the height and width of the image control, and apply this answer to add just as much white or transparent left padding to the picture itself to make it appear right-aligned inside the image control.
This will incur additional processing time and memory consumption, but saves you the pain the accepted answer is talking about.
精彩评论