You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jeremias Maerki <de...@jeremias-maerki.ch> on 2006/06/01 14:57:13 UTC

Re: Scaling images that are running off the page!

I think the layout manager code for external-graphic and
instream-foreign-object still have smaller problems in this area. It
seems that the code doesn't properly check if they height exceed the
area made available. The image is always scaled horizontally to the
available limits. Now, if the image is too high, the image area is too
large for the page and results in a RuntimeException ("Some content
could not fit....") It's this error you get, right?

In the short time I've looked into this, I didn't find any work-arounds.
The only thing you can do is know beforehand how big the images are and
adjust the attributes on the e-g element accordingly. I guess the layout
manager code for AbstractGraphicsLayoutManager will have to be improved.

On 31.05.2006 16:12:35 Krishna.Cherla wrote:
> Hello All,
> 
> I am trying to scale images that are running off the page owing to their
> width and height dimensions.
> 
> My page has a width of 7 inches and a height of 6.75 inches.
> 
> This is my fo: instruction:
> 
> 	<fo:external-graphic width="100%" content-height="100%"
> content-width="scale-to-fit" scaling="uniform" display-align="center">
> 		<xsl:attribute name="src">url('<xsl:value-of
> select="FileName"/>')</xsl:attribute>
> 	</fo:external-graphic>
> 
> But when I try to insert an image that has dimensions of 2000X2000
> pixels it fails. It fails for an image that is 512X716. But works for an
> image that is 800X750. 
> 
> Is there a way by which I could scale the image both horizontally and
> vertically so that I can insert an image of any dimensions?
> 
> Between thanks to Chris Bowditch for helping me out with other issues.
> Chris , I was able to work out the other spacing issues.It just required
> moving some blocks and inlines around.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org