Ok... but I didn't see how it should work.
My target is to have a implementation which is able to
down scale the images if it is necessary. In serveral cases
I get smaller images, so it is wrong to scale them to the max. space.
(Of course I need the "scale-down-to-fit")

Currently I have no idea how it can be fixed,
because I will get in my template different images and I don't know the
meassurements of them.

Von: Luis Bernardo [mailto:lmpmberna...@gmail.com]
Gesendet: Mittwoch, 26. Februar 2014 00:56
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Scaling images

For you specifying an absolute height in the block-container or in the 
external-graphic should be the same (in terms of complexity). So I don't see 
the need for a workaround. But I will confirm whether the fact that 
content-height does not seem to take the height from the block-container is a 
bug, and then I will create a Jira ticket if needed.

On 2/25/14, 2:18 PM, 
markus.sticker.e...@zf.com<mailto:markus.sticker.e...@zf.com> wrote:
Ok. But scaling has in our case to be dynamic.
So I even can calulate the maximum availiable space.
Will there be a bug created in the Jira?
What I mean is, will it be fixed by the apache team or
should I build a workaround?

Von: Luis Bernardo [mailto:lmpmberna...@gmail.com]
Gesendet: Dienstag, 25. Februar 2014 14:05
An: fop-users@xmlgraphics.apache.org<mailto:fop-users@xmlgraphics.apache.org>
Betreff: Re: Scaling images

Add the height attribute to the external-graphic element. Now, I was expecting 
that height="100%" would work in this case but it doesn't seem to be the case 
so either there is a bug in the code or in my understanding. But if you specify 
an absolute value, say height="150mm", then it works.

On Mon, Feb 24, 2014 at 2:54 PM, 
<markus.sticker.e...@zf.com<mailto:markus.sticker.e...@zf.com>> wrote:
But it fails also.
Is there really a support of content-height="scale-to-fit"    ?

Von: Luis Bernardo 
Gesendet: Montag, 24. Februar 2014 15:46

An: fop-users@xmlgraphics.apache.org<mailto:fop-users@xmlgraphics.apache.org>
Betreff: Re: Scaling images

Yes, that is the best approach. You can even check now that a percentage for 
the height attribute in the external-graphic element works since the height of 
the containing block is being explicitly set.

On Mon, Feb 24, 2014 at 2:25 PM, 
<markus.sticker.e...@zf.com<mailto:markus.sticker.e...@zf.com>> wrote:
Ok should I use something like this?
      <fo:block-container width="100mm" height="150mm" border="solid solid 
solid solid" border-color="pink" background-color="violet" >
        <fo:block id="id1049528" border="solid solid solid solid" 
border-color="red" background-color="blue">
  content-height="scale-to-fit"     scaling="uniform"/>

Von: Luis Bernardo 
Gesendet: Montag, 24. Februar 2014 14:33
An: fop-users@xmlgraphics.apache.org<mailto:fop-users@xmlgraphics.apache.org>
Betreff: Re: Scaling images

I think the issue is height="100%", which doesn't work the way you probably 
expect... When you specify 100%, you want 100% of what? Width does not suffer 
from the same "problem" because the width is constrained by the page width. 
Since the height is not constrained by the page height, as you maybe expected, 
then you get the  behavior you noticed.

>From the spec for height:

Specifies a percentage height. The percentage is calculated with respect to the 
height of the
generated box's containing block. If the height of the containing block is not 
specified explicitly
(i.e., it depends on content height), the value is interpreted like "auto".

So that's what you get, i.e., you get auto.

On Mon, Feb 24, 2014 at 1:09 PM, 
<markus.sticker.e...@zf.com<mailto:markus.sticker.e...@zf.com>> wrote:
Hello FOP,

I've got an issue about scalling images.
The target is to scale images so they fit to the space on the page.
Scaling the width works fine.
I set this ("breit.png" is a picture with extreme width):
 content-width="scale-to-fit"  width="100%" height="100%" 
inline-progression-dimension.minimum="1%"  scaling="uniform" />

So I tried this ("hoch.png" is a picture with extreme height) :
 content-height="scale-to-fit" width="100%" height="100%" 
inline-progression-dimension.minimum="1%"  scaling="uniform"/>
--> That failed --> The image was not scaled.

So what's wrong ?

Thanks and
Kind regards
Markus Sticker
Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
Infrastruktur/Infrastructure (DTEP4)
ZF Friedrichshafen AG
88038 Friedrichshafen, Deutschland/Germany
Telefon/Phone  +49 7541 77-7644<tel:%2B49%207541%2077-7644>, Telefax/Fax  +49 
7541 77-907644<tel:%2B49%207541%2077-907644>

Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. 
Giorgio Behr
Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr. 
Konstantin Sauer, J├╝rgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz
Sitz/Headquarters: Friedrichshafen
Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the 
municipal court of Ulm HRB 630206

Reply via email to