xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burton, Jeff" <jeff.bur...@plantops.ubc.ca>
Subject RE: upgrade to fop 0.92 - image problem (no wrap)
Date Mon, 01 May 2006 21:38:10 GMT
Thank you for your help... sorry for not including the fo code.

I've tried putting in that zero space width character... (Character entity for zero-width-space
seems to be '&#x200b;' or '&#8203;'(<that one is the one suggested by my editor)
rather than (&#200b;)the later isn't accepted by my editor)... When I add this i get the
error below:
Error Mssg:
SEVERE: Exception
java.lang.RuntimeException: Some content could not fit into a line/page after 50 attempts.
Giving up to avoid an endless loop. (fo:block, location: 208/313)

If I take out that section (<fo:inline>&#x200b;</fo:inline>) from the xsl
and use just the char ref, it still doesn't work.  If I take out either and leave it the way
it was before, it works, but the photos don't line break as they were doing before (and as
such, was expected)

the code is attached, the first chunk is when i include the <fo:inline>&#x200b;</fo:inline>
and the second a chucnk from the same seciton with a little ore context as it was before I
added the zero width spaces.

I had a look at the mailing list topic you mentioned (http://marc.theaimsgroup.com/?l=fop-dev&m=113151196116514&w=2)
and it sounds like simply wrapping those e-g in the zero space width char should do the trick...
but for some reason it is not... As I said, I am new at this...if you have any idea why this
isn't working... thank you for your help.

FO CODE:

<fo:block font-weight="bold">After</fo:block>
					<fo:block margin-left="2em" margin-right="2em">
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a1.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a2.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a3.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a4.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a5.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
						<fo:inline> </fo:inline>
						<fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
							content-width="scale-to-fit" padding="0.3em"
							src="url('./pics/t_2a6.jpg')"/>
						<fo:leader leader-length="0.75em" leader-pattern="space"/>
						<fo:inline> </fo:inline>
					</fo:block>

OLD FO CODE(for last post):

           <fo:block font-size="12pt" font-family="sans-serif" keep-together="always">
                <fo:block color="black" background-color="#1f77b4" border-width="0px"
                    border-style="solid" border-color="black" font-size="14pt" width="100%"
                    padding="0.18em" space-after="0.5em">
                    <fo:inline>2</fo:inline>
                    <fo:inline><fo:leader leader-length="2.5em" leader-pattern="space"/>Wyman
Plaza,
                        University Centre, Ponderosa, Mackenzie House</fo:inline>
                </fo:block>
                <fo:block text-align="end">GMSL</fo:block>
                <fo:block space-after="1em"><fo:inline font-weight="bold">Date:
</fo:inline>May</fo:block>
                <fo:block space-after="3em"><fo:inline font-weight="bold">Description:
                    </fo:inline>Annual display of flowers and spring bulb show at Wyman
Plaza,
                    annuals at Ponderosa (front entrance), University Centre and Grad Centre.
</fo:block>
                <fo:block space-after="2em">
                    <fo:block font-weight="bold">After</fo:block>
                    <fo:block margin-left="2em" margin-right="2em">
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a1.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a2.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a3.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a4.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a5.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                        <fo:external-graphic width="4cm" height="3cm" content-height="scale-to-fit"
                            content-width="scale-to-fit" padding="0.3em"
                            src="url('./pics/t_2a6.jpg')"/>
                        <fo:leader leader-length="0.75em" leader-pattern="space"/>
                    </fo:block>
                </fo:block>
            </fo:block>
       

> -----Original Message-----
> From: Manuel Mall [mailto:manuel@apache.org]
> Sent: Friday, April 28, 2006 8:53 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: upgrade to fop 0.92 - image problem (no wrap)
> 
> 
> On Friday 28 April 2006 23:52, Burton, Jeff wrote:
> > I've just upgraded to FOP 0.92 (from 0.20.5)  to take advantage of
> > the keep-together support, but I've encountered a new problem.
> >
> > I have an xml file that contains image links (0-10 images) that is
> > used to create a pdf (I'm using the oxygen editor which has xalan
> > built in and I use fop 0.92 to create the pdf)
> >
> > First problem was image scaling/size, that was fixed from 
> information
> > at this link http://issues.apache.org/bugzilla/show_bug.cgi?id=37136
> >
> > next problem is that while images used to just be put on (wrap to)
> > the next line when there are too many to fit in the width of the
> > page, now they just run off the page to the right. I haven't been
> > able to cure this one.
> >
> > I've tried setting the width of the containing fo:block but that
> > changes nothing. Text wraps nicely, but the images do not. I'm sure
> > there is something that I need to specify, but I have been unable to
> > find what it might be either from my friend google or the 'manual'.
> > Possibly I don't know what I am looking for, I am very new with
> > xsl:fo.
> >
> <snip/>
> 
> Jeff,
> 
> with the XSL alone its difficult to tell whats going on. Can you post 
> the actual .fo file produced, that is the XALAN output before it goes 
> into FOP. And please cut that output down to the smallest 
> possible file 
> still exhibiting the problem.
> 
> I believe there is a difference in line breaking behaviour between 
> 0.20.5 and 0.92 when it comes to <fo:external-graphic> and 
> <fo:instream-foreign-object> elements (See the fop-dev 
> mailing list for 
> a topic called 'Linebreaks around e-g and i-f-o'). If you have 
> consecutive <fo:external-graphic> elements without any spaces between 
> them 0.92 will not break between those elements while 0.20.5 will. 
> However, without seeing the actual file you give to FOP its 
> hard to say 
> if this is the case here. You could try and put a zero-width-space 
> (&#200b;) before and after each <fo:external-graphic> element in your 
> XSL.
> 
> Manuel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 

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


Mime
View raw message