RE: [xsl] Graphics scaling on XSLFO - need suggestions

Subject: RE: [xsl] Graphics scaling on XSLFO - need suggestions
From: ms <mina_hurray@xxxxxxxxx>
Date: Mon, 12 Feb 2007 15:38:50 -0800 (PST)
Hi Angela:

Thank you for your detailed email. I tried resetting
the margins to what you mentioned and removed the
actual "height" and "width" attributes on the graphic
itself but it again says "no space for element to
recover".

The region-before extent is set to 37mm and the
region-after to 17mm. Is there anything that I am
doing wrong here?


--- Angela Williams
<Angela.Williams@xxxxxxxxxxxxxxxxxx> wrote:

> No - your code doesn't work for me, either.  
> 
> See
> http://www.renderx.net/lists/xep-support/2089.html
> for more info on
> scaling graphics.
> 
> If your page margins are defined as 8.5 x 11, I
> believe you need to
> subtract the top and bottom page margin AND the top
> and bottom body
> margin to determine the allowable height of the
> graphic (likewise, the
> left and right page and body margins to determine
> the max width.) 
> 
> In my case, I am using .5in margins for both page
> and body (1in total
> all around), so the I believe the max allowable
> height of the graphic
> would be 9in for an 11in page-height BUT the max
> width would only be
> 6.5in.
> 
> I set the height and width to equal the max values
> and used
> scale-to-fit. 
> 
> <xsl:attribute-set name="first-page-body-margins">
> A)    <xsl:attribute
> name="margin-top">.5in</xsl:attribute>
> B)    <xsl:attribute
> name="margin-bottom">.5in</xsl:attribute>
> C)    <xsl:attribute
> name="margin-left">.5in</xsl:attribute>
> D)    <xsl:attribute
> name="margin-right">.5in</xsl:attribute>
>   </xsl:attribute-set>
>   
>   <xsl:attribute-set name="first-page-margins">
> E)    <xsl:attribute
> name="page-height">11in</xsl:attribute>
> F)    <xsl:attribute
> name="page-width">8.5in</xsl:attribute>
> G)    <xsl:attribute
> name="margin-top">.5in</xsl:attribute>
> H)    <xsl:attribute
> name="margin-bottom">.5in</xsl:attribute>
> I)    <xsl:attribute
> name="margin-left">.5in</xsl:attribute>
> J)    <xsl:attribute
> name="margin-right">.5in</xsl:attribute>
>   </xsl:attribute-set>
> 
> 
> E - A - B - G - H = 9in max height
> F - C - D - I - J = 6.5 max width
> 
> <fo:external-graphic content-height="scale-to-fit"
> height="9in"
> content-width="scale-to-fit" width="6.5in"
> src="url({@href})"/>
> 
> -----Original Message-----
> From: ms [mailto:mina_hurray@xxxxxxxxx] 
> Sent: Friday, February 09, 2007 1:20 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] Graphics scaling on XSLFO - need
> suggestions
> 
> Hi Angela:
> 
> I use XEP 4.4 too. The xml for the graphics has:
> 
> <graphic href="2367.tif" height="8.35in"
> width="7.5in"/>
> 
> And in the XSLFO i use <fo:external-graphic>
> 
> My code has 
> 
> <fo:external-graphic content-height="{@height}"
> content-width="{@width}" src="url({@href})"/>
> 
> Please let me know if there is anything wrong in
> this
> construct. 
> 
> --- Angela Williams
> <Angela.Williams@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > I use XEP 4.4 and scale the content-height
> > successfully.
> > 
> > -----Original Message-----
> > From: ms [mailto:mina_hurray@xxxxxxxxx] 
> > Sent: Friday, February 09, 2007 10:57 AM
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: Re: [xsl] Graphics scaling on XSLFO -
> need
> > suggestions
> > 
> > Hello all:
> > 
> > Thank you for your reply. I use XEP. And I did try
> > setting just the content-width and still get the
> > same
> > error.I will check the XEP forum.
> > 
> > 
> > --- Jay Bryant <jay@xxxxxxxxxxxx> wrote:
> > 
> > > > Hi all:
> > > >
> > > > I am having issues with displaying graphics on
> > the
> > > PDF
> > > > using XSLFO. A graphic measuring 7.5in by
> 8.35in
> > > gives
> > > > a "no space for element to recover" error
> while
> > > > generating the PDF using XSLFO. Can anybody
> > point
> > > me
> > > > to a forum where I can post these kind of
> issues
> > > or
> > > > can anyone on this list give me some ideas?
> > > >
> > > > Thanks in advance
> > > 
> > > Hi, Mina,
> > > 
> > > It would help if you would mention which FO
> > > processor you use, because the 
> > > answer to your problem probably varies by
> > processor.
> > > However, you can try a 
> > > couple things that may work regardless of which
> > > processor you use. (Also, I 
> > > assume that you are using the external-graphic
> > > element.)
> > > 
> > > First, try setting the content-width attribute
> to
> > > whatever width you want. 
> > > The height should scale automatically. You can
> > also
> > > try setting the width 
> > > attribute (though that's really for the bounding
> > box
> > > around the image).
> > > 
> > > This is the right place for FO questions, by the
> > > way. However, whatever 
> > > processor you use very probably has a mailing
> list
> > > or forum where folks who 
> > > know the quirks of that tool can provide more
> > > specific answers.
> > > 
> > > HTH
> > > 
> > > Jay Bryant
> > > Bryant Communication Services 
> > > 
> > > 
> > 
> > 
> > 
> >  
> >
>
________________________________________________________________________
> > ____________
> > Don't get soaked.  Take a quick peak at the
> forecast
> > with the Yahoo! Search weather shortcut.
> >
> http://tools.search.yahoo.com/shortcuts/#loc_weather

Current Thread