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 Kuba Królikowski <ku...@kompakt.pl> on 2004/02/19 14:04:22 UTC

How to put some text on next to last page?

Hi.

I have a document with a lot of text and I don't know how many pages it 
will give after rendering. Do you know how could I print some special 
text on next to last page?

Kuba Królikowski



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


Re: How to put some text on next to last page?

Posted by Jeremias Maerki <de...@greenmail.ch>.
Two ways come to my mind:
1. You can postprocess the generated document and add additional text
using iText for example. But it depends on your layout if this is
possible at all.
2. Also depending on your layout needs: Use a separate page-sequence for
the last two pages.

FOP currently provides no means to do what you need in a generic way
especially since page-position="last" doesn't work, yet. I don't think
that your requirement can even be fulfilled in XSL-FO in the first place,
but I could be wrong.

On 19.02.2004 14:04:22 Kuba Królikowski wrote:
> I have a document with a lot of text and I don't know how many pages it 
> will give after rendering. Do you know how could I print some special 
> text on next to last page?


Jeremias Maerki


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


RE: How to put some text on next to last page?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Kuba Królikowski [mailto:kubak@kompakt.pl]
> >
> >> I have a document with a lot of text and I don't know how many pages
> >> it will give after rendering. Do you know how could I print some
> >> special text on next to last page?
> >
> >
> > The simplest solution would be to actually put the text on next
> > to last page, perhaps in a new page sequence. Maybe you mean
> > something more complicated?
> >
> > J.Pietschmann
> >
> >
>
> Yes. I have one very long page sequence with a lot o text. I don't know
> how many pages it will take. I just one to print something on the next
> to last page in the footer.
>

Aha... but it needs to be in the same page-sequence as the rest of the text,
not?

In that case, hmm, I see no immediate option, maybe a little cheat? If you
can edit the FO, try inserting an fo:marker containing the desired text at
about the place where you know from a previous rendering that the center of
the second-to-last page is going to be (-- but not on the last page or the
third-to-last, take care! :/ )
Then, in the static-content for the region-after, add an fo:retrieve-marker
for this. IIC the retrieve-marker would render you an empty block on all
pages where no corresponding marker can be found.

I know, it's far from an ideal solution, but it *would* do the trick...

Oh, another detail: there's a nasty bug with markers that renders them with
the same properties as the region/block where they are defined, so to make
it work correctly, you have to add an fo:wrapper around the marker to set
the font-size/-weight etc. to the same values they have in the static
content...

For more info: check the examples for markers that came with FOP
(FOP_HOME/examples/fo/markers)

Hope this helps!

Cheers,

Andreas


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


Re: How to put some text on next to last page?

Posted by Kuba Królikowski <ku...@kompakt.pl>.
> Kuba Królikowski wrote:
> 
>> I have a document with a lot of text and I don't know how many pages 
>> it will give after rendering. Do you know how could I print some 
>> special text on next to last page?
> 
> 
> The simplest solution would be to actually put the text on next
> to last page, perhaps in a new page sequence. Maybe you mean
> something more complicated?
> 
> J.Pietschmann
> 
> 

Yes. I have one very long page sequence with a lot o text. I don't know 
how many pages it will take. I just one to print something on the next 
to last page in the footer.

Kuba Królikowski



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


Re: How to put some text on next to last page?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Kuba Królikowski wrote:
> I have a document with a lot of text and I don't know how many pages it 
> will give after rendering. Do you know how could I print some special 
> text on next to last page?

The simplest solution would be to actually put the text on next
to last page, perhaps in a new page sequence. Maybe you mean
something more complicated?

J.Pietschmann


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