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 E S <al...@yahoo.com> on 2004/02/27 08:28:30 UTC

Enforcing absolute limit to number of pages rendered by fop

Is this possible? I played with force-page-count but
this only optionally adds a blank page.

My requirement is that I want only n number of pages
(usually one) rendered.  Whatever content that may
have been rendered on page two would then be lost -
this is fine.

Thanks for any help.

Eric






__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

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


Re: Enforcing absolute limit to number of pages rendered by fop

Posted by "J.Pietschmann" <j3...@yahoo.de>.
E S wrote:
> Is this possible? I played with force-page-count but
> this only optionally adds a blank page.
> 
> My requirement is that I want only n number of pages
> (usually one) rendered.  Whatever content that may
> have been rendered on page two would then be lost -
> this is fine.

If you want to render only one page, put all the content in an
absolutly positioned fo:block-container. There will be no page
break in such a block container, and al content which doens't
fit on the same page is lost, although it will write beyond the
bounds of the block container and possibly overwrite the after
region. If you have to put something into the after region,
use a background color or image in order to make the overflowed
body content invisible.

There is no bullet-proof way to write exactly N pages with N>1.
You can do some formatting yourself by estimating the space
needed and use ordinary flow for the N-1 pages and put the
rest in an absolutely positioned block container on the Nth
page, as above. Another possiblity might be to use a
repeatable-page-master-reference for the N-1 pages and s single
page master reference with a very large page heigth for the last
page, and somehow truncate the last page during printing or
other post-processing. Note that FOP will not stop processing
after it runs out of page masters, it will continue with the
last page master in use (as permitted by the spec).

J.Pietschmann

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