You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Roland Schroth <rs...@albit.de> on 2003/11/13 11:52:04 UTC

Re: image in table header overlapping table body <-- possible ? [additional info]

I think your idea could work if i had only one table starting at the top of
the page.

   But (sorry that i did not mention that) i have a sequence of tables of
   different lengths that therefore also may start in the middle of a page.
   There are tables being only a few rows long an others spanning 2 or 3
   pages. So i need something that will work for that case too.

Anyway, thanks for your quick response.

Roland

> > But i need the image to overflow the bottom of the header line
> > (leaving its
> > height unchanged) so that it flows right into the body area. The
> > problem is
> > that the overflow property isn't supported yet and a number-rows-spanned
> > does not seem to work here because header and body rows obviously
> > cannot be
> > mixed.
> >
>
> Try the following (for example):
>
> in the simple-page-master, set the margin-top for the region body to the
> height of the one line containing 'Some Header Text' --depending on the
> font-size of the text, of course.
> Then set the height of the region-before to be greater than the margin-top
> just defined (roughly equivalent to the height of the image).
>
> This way your region-before will actually overlap the region-body by
> (region-body-margin-top - region-before-height).
>
> (This trick has often been advised as a workaround for adding watermarks,
so
> I guess the result would be that the header-image actually ends up being
> overwritten by the content of the region-body --if any... So if you make
> sure the first rows have no content at all in the first columns, this
should
> actually work.)



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


Re: image in table header overlapping table body <-- possible ? [additional info]

Posted by Roland Schroth <rs...@albit.de>.
> > > -----Original Message-----
> > > From: Roland Neilands [mailto:rneilands@pulsemining.com.au]
> > >
> > > Roland,
> > >
> > > Use nested tables:
> >
> > That is what i tried yesterday, too. Thanks anyway.
> > It's a solution to get the image in the first header of the table. But i
> > still end up with the problem having it repeated after a page break.
>
> Aaah... you *don't* need the image repeated across pages.

Ooops ... no sorry. One of these situations, my lack of practice with the
english language shows up.

    I  *absolutely need*  it to be repeated.

Thanks again,
Roland



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


RE: image in table header overlapping table body <-- possible ? [additional info]

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Roland Schroth [mailto:rs@albit.de]
>
>
> > -----Original Message-----
> > From: Roland Neilands [mailto:rneilands@pulsemining.com.au]
> >
> > Roland,
> >
> > Use nested tables:
>
> That is what i tried yesterday, too. Thanks anyway.
> It's a solution to get the image in the first header of the table. But i
> still end up with the problem having it repeated after a page break.

Aaah... you *don't* need the image repeated across pages.

> The text header will be repeated as there is data in its table-body being
> continued after the page break. But there is no data in the
> table-body that

So, the image would actually belong to the table-body, and only the text
belongs to table-header (? correct?).
In that case my proposal could work, if it were not for the complication
described below.

> There occur line breaks in the rows (mostly generated within FOP caused by
> hyphenation), that i cannot calculate that easy. Therefore i cannot set a
> fixed row height and i do not know how many rows there will be on
> a page. I
> tried to calculate these linebreaks according to the amount of text in the
> fields but that's quite dirty (and not completely functioning at all ...)
>

Very dirty indeed... Imagine having to deal with a situation like this and
having to base your calculations on the metrics of the particular font being
used. (for fixed-width fonts this would be a bit less complicated since you
can just take the number of chars and multiply that by the charwidth).

> I think i will try to get some other things working first and come back to
> this one next week. Sometimes a weekend of doing nothing helps more than
> days of thinking ;-)
>

Very wise indeed!

Cheerz,

Andreas


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


RE: image in table header overlapping table body <-- possible ? [additional info]

Posted by Roland Neilands <rn...@pulsemining.com.au>.
> > Use nested tables:
> 
> That is what i tried yesterday, too. Thanks anyway.
> It's a solution to get the image in the first header of the table. But i
> still end up with the problem having it repeated after a page break.
> The text header will be repeated as there is data in its table-body being
> continued after the page break. But there is no data in the table-body that
> belongs to the image header so there is no reason for FOP to repeat the
> header (the image) on the next page.

So put a single cell in the body beneath the image.
Put a blank image or a non-breaking space(&#160;) in it to force it to appear.

Cheers,
Roland 

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


Re: image in table header overlapping table body <-- possible ? [additional info]

Posted by Roland Schroth <rs...@albit.de>.
> -----Original Message-----
> From: Roland Neilands [mailto:rneilands@pulsemining.com.au]
>
> Roland,
>
> Use nested tables:

That is what i tried yesterday, too. Thanks anyway.
It's a solution to get the image in the first header of the table. But i
still end up with the problem having it repeated after a page break.
The text header will be repeated as there is data in its table-body being
continued after the page break. But there is no data in the table-body that
belongs to the image header so there is no reason for FOP to repeat the
header (the image) on the next page.
And with this problem in mind i come to the idea of Andreas.

> ----- Original Message ----- 
> From: "Andreas L. Delmelle" <a_...@pandora.be>


> I see a remote possiblity in performing some XSL trickery (resting on the
> assumption that the rows in the table body are generated by XML elements).
> If you define a row height globally in your stylesheet, as well as the
> region-body height... You know in advance how many rows will fit on a
> page... ( $regbh div $rowh ).

And here we have my next problem ...
There occur line breaks in the rows (mostly generated within FOP caused by
hyphenation), that i cannot calculate that easy. Therefore i cannot set a
fixed row height and i do not know how many rows there will be on a page. I
tried to calculate these linebreaks according to the amount of text in the
fields but that's quite dirty (and not completely functioning at all ...)

> For the moment, however, it's the closest thing to a solution I can come
up
> with...

I agree.

I think i will try to get some other things working first and come back to
this one next week. Sometimes a weekend of doing nothing helps more than
days of thinking ;-)

Thanks to both of you and have a nice weekend,
Roland



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


RE: image in table header overlapping table body <-- possible ? [additional info]

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Roland Schroth [mailto:rs@albit.de]
>
> I think your idea could work if i had only one table starting at
> the top of
> the page.
>

The mistake was mine... Didn't study the drawing closely enough to see that
it was about *table* headers. Sorry 'bout that.

>    But (sorry that i did not mention that) i have a sequence of tables of
>    different lengths that therefore also may start in the middle
> of a page.
>    There are tables being only a few rows long an others spanning 2 or 3
>    pages. So i need something that will work for that case too.
>

A very tough one...

I see a remote possiblity in performing some XSL trickery (resting on the
assumption that the rows in the table body are generated by XML elements).
If you define a row height globally in your stylesheet, as well as the
region-body height... You know in advance how many rows will fit on a
page... ( $regbh div $rowh ).
Then, for each set of XML elements (corresponding to a table) you know in
advance how many rows will be generated (counting the nodes). You also know
that the first element of the set/table will generate an additional row to
accomodate the header-text & the image --first cell has a rowspan of 4 - so
if a table starts at the top of the page, you will be able to put ( ( $regbh
div $rowh ) - 1 ) of the XML elements (rows) on the same page.
If the table starts in the middle of a page and each table is being
generated by a template, maybe the maximum possible number of rows that can
still fit on the 'page' can be passed in as a parameter...
(Keep in mind that this is all pure calculation, as there is no concept of a
page-layout at the XSLT stage.)

Then again... having to keep count of the elements and inserting a 'fake'
header at every expected page-break is hardly an ideal situation. (Not to
mention that it will lead to trouble if somehow the page-break doesn't end
up where expected)

For the moment, however, it's the closest thing to a solution I can come up
with...

Anyone?


Cheerz,

Andreas


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