OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Fitting tall images in PDF

Thanks Bob and David,

What's the right way to pass the "scale-down-to-fit" attribute value into the FO?

I've tried adding them as attributes on <imagedata> with some XSL that I was using before to handle wide images. Here's the template where xmlns:db="http://docbook.org/ns/docbook" exclude-result-prefixes="db":

 <xsl:template match="db:imagedata">
  <xsl:element name="imagedata" namespace="http://docbook.org/ns/docbook">
   <xsl:apply-templates select="node()|@*"/>
   <xsl:attribute name="contentdepth">scale-down-to-fit</xsl:attribute>
   <xsl:attribute name="contentwidth">scale-down-to-fit</xsl:attribute>
   <xsl:attribute name="align">center</xsl:attribute>

After this transformation and running the stylesheets, text-align="center" shows up in the resulting .fo, but the others are null: content-width="" content-height="".

Is there a stylesheet customization I should apply to allow those attribute values to pass through to the FO?

Or do I need to edit the FO after it gets generated?


On Sat, Jan 4, 2014 at 6:30 PM, David Cramer <david@thingbag.net> wrote:
What about setting content-width and content-height in the fo to
scale-down-to-fit? Should be supported in fop and xep; not sure about
antenna house:



On 01/03/2014 04:35 PM, Bob Stayton wrote:
> Hi Mark,
> I'm not sure you can do that with XSL-FO.  It works for width because an
> image is not competing with other content for width space.  So defining
> width="100%" means the dedicated viewport is 100% of the width of the
> page between margins, and the image is located within that viewport,
> sized down to fit if necessary.
> If you set depth="100%", you are creating a viewport that is the height
> of the remaining space on the page, not the whole page.  So the height
> of that viewport depends on what precedes the image on the page.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]