xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <markus.sticker.e...@zf.com>
Subject AW: Scaling images
Date Mon, 24 Feb 2014 13:54:53 GMT
The page-master  page-height doesn't have a effect?
<fo:simple-page-master master-name="body-odd" page-width="210mm" page-height="297mm" margin-top="1cm"
margin-bottom="1cm" margin-left="1.5cm" margin-right="1.5cm">
      <fo:region-body margin-bottom="2cm" margin-top="2cm" column-gap="12pt" column-count="1"/>
      <fo:region-before region-name="xsl-region-before-odd" extent="1.5cm" display-align="before"/>
      <fo:region-after region-name="xsl-region-after-odd" extent="1.5cm" display-align="after"/>

So I tried to wrap a block container on that. It also failed.
So what's the solution on that issue?

Best regards


Von: Luis Bernardo [mailto:lmpmbernardo@gmail.com]
Gesendet: Montag, 24. Februar 2014 14:33
An: 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
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.epos@zf.com<mailto:markus.sticker.epos@zf.com>>
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):
<fo:external-graphic src="url(file:///c:/temp/SernaPlugin/Source/draft/draft/breit.png<file:///c:\temp\SernaPlugin\Source\draft\draft\breit.png>)"
content-width="scale-to-fit"  width="100%" height="100%" inline-progression-dimension.maximum="100%"
inline-progression-dimension.minimum="1%"  scaling="uniform" />

So I tried this ("hoch.png" is a picture with extreme height) :
<fo:external-graphic src="url(file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.png<file:///c:\temp\SernaPlugin\Source\draft\draft\hoch.png>)"
content-height="scale-to-fit" width="100%" height="100%" inline-progression-dimension.maximum="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

View raw message