Hi All,
This is only my first post on this forum and only my second day of
writing XSL:FO and using FOP - I am trying to produce a services catalogue
for a friend who runs a small training business and my design goal is to
maintain one copy of the catalogue in XML with both Web and PDF rendering.
I'm using Ken Holman's 'Definitive XSL-FO' as a reference as well as Michael
Key's "XSLT2.0 and XPath2.0 Programmer's Reference' to assist me with this.
I would very much like to be able to put a rounded rectangle box (or other
SVG frame) around blocks of text with varying size. I know that using
'background-image' has no support for scaling (unless I could afford XEP
which appears to have an extension for this) - So I then though I was on to
a winner by using the following:
40 <fo:block-container>
41 <fo:block-container absolute-position="absolute" height="auto"
width="auto" border="1px solid blue">
42 <fo:block border="2px solid green">
43 <fo:external-graphic src="url("box3.svg")"
overflow="hidden" border="1px dashed black" content-height="
scale-to-fit" width="100%" height="100%" content-width="scale-to-fit"
scaling="non-uniform" />
44 </fo:block>
45 </fo:block-container>
46
47 <fo:block border="3px solid yellow">
48 <xsl:apply-templates select="title"/>
49 <xsl:apply-templates select="duration"/>
50 <xsl:apply-templates select="coursedesc"/>
51 </fo:block>
52
53 </fo:block-container>
Bear in mind that I've been messing around a lot with the various properties
of each object, so my choices may not appear completely sane. Also the
'border' properties are there purely for me to see and debug the layout.
What I'm finding is that the blocks inserted by the templates 'title',
'duration' and 'coursedesc' force the block on line 47 to grow to the size
of the text, but because the block-container at line 41 is positioned
absolutely to allow it to sit behind the text content, it has no way of
basing its size on the quantity of text.
I'm really keen to know if anyone has a solution for this issue as it seems
a reasonably key function to be able to dynamically scale a background image
(I've hit exactly the same issue before with XHTML + CSS).
Any advice would be very much appreciated on any way that I might achieve
this effect.
Many Thanks
Jonathan
--
View this message in context:
http://www.nabble.com/Problem-scaling-%27backgrounds%27-using-external-graphic-inside-absolute-block-container-tp18085205p18085205.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]