2009-05-19 10:45:14 UTC
I have read manuals many times and some hours using net to read scaling problems with fop.
This give about good result but not absolut answer:
img {
content-height: scale-to-fit;
content-width: scale-to-fit;
display: graphic;
scaling: uniform;
src: src;
}
img.pic {
content-width: scale-to-fit;
content-height: 100%;
width: 100%;
display: graphic;
src: src;
scaling: uniform ;
}
class pic works now with big images. It scale ok too wide images.
I have small icons like 20x20 pixels in my doc. Current status is that those images are about 150% too big.
But if I set
img {
content-height: 50%;
content-width: scale-to-fit;
display: graphic;
scaling: uniform;
src: src;
}
then small images have scaled about okay.
I tested also max-width, but it not works. Some errors. My idea was to use max-width, system scale if width is more than max. It was nice idea for big images.
(fop 0.95, css2xslfo 1.6.1)
-jukka-