You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Art Welch <ar...@EASTPOINT.COM> on 2000/04/17 20:06:08 UTC

Table row background-color problem

I am just getting back to working with FOP after spending time on other
things for a while.

I had encountered a problem setting the background-color on table-rows. The
vertical arguments to addRect() seem to not be correct "sometimes". I had
last noticed this when I was working on my PCL renderer and changed my
renderer to adjust the values while it was rendering to make things come out
OK. At the time I did not try looking at what the PDF was doing (I think
that the PDF was not working for some other reason at the time). I just
assumed (BAD) that PDF wanted things that way. If I recall correctly (have
not confirmed the details yet) the main problem was the height argument to
addRect. It was sometimes negative of what it should have been and too tall
(by some multiple of the row height I think).

At the time I was using FOP 0.12.0. I am now using 0.12.1 and I have now
viewed the generated PDFs in Acrobat and it does indeed seem to be a
problem. Visually the background color changes go UP the page covering what
should be the prior text. If I take the background-color out all the text
displays correctly.

At one time there had been a lot of talk about fixing problems with tables
and I even thought someone had mentioned fixing a problem with negative
vertical coordinates. I thought that I heard this before 0.12.1 and so had
hoped that 0.12.1 would fix these problems. It looks like this was not
changed - my PCL renderer still works.

Does anyone know if this is a known problem or if it has been fixed in the
current code? Seems like it has been quite a while since there has been a
release - any plans for another release sometime?

For reference here is a piece of an XSL that exhibits this problem:

<xsl:template match="summarysec1">
	<fo:table space-after.optimum="14pt" font-family="monospace"
font-size="10pt" line-height="12pt">
		<fo:table-column column-width="5in"/>
		<fo:table-column column-width="1in"/>
		<fo:table-body>
			<fo:table-row background-color="silver">
				<fo:table-cell>
					<fo:block>
						Account Number
					</fo:block>
				</fo:table-cell>
				<fo:table-cell>
					<fo:block text-align="end">
						<xsl:value-of
select="acctnumb"/>
					</fo:block>
				</fo:table-cell>
			</fo:table-row>
 . . .

The PDF produced from this has a silver bar ABOVE the "Account Number" row.
It also is twice as high as the account number row. Something like:

::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::
Account Number

Thank You,
Art