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 Michael Aronov <ma...@entricom.com> on 2001/01/11 04:20:34 UTC
page-breakes
Hallo,
I am working now on a document, which will contain an arbitrary number of
forms (the number is unknown at design time; the information comes from a
database). Each form will take a little less than one page (not more) and
should start with a new page. So I use a tag for a form (which includes
several other tags). The problem is that when I use
break-after/break-before properties, I always get an extra empty page. Can I
get rid of this page?
Thank you,
Michael Aronov.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: page-breakes
Posted by Corneanu Dan <cd...@savatech.ro>.
Hi,
i had the same problem and I used the following workaround: the first form will
not have a break-before property. I think this is something that needs to be
corrected in the actual FOP implementation. If a block is rendered on the first
page and has the break-before property it should not go to the next page.
Best regards, Dan.
Michael Aronov wrote:
> Hallo,
> I am working now on a document, which will contain an arbitrary number of
> forms (the number is unknown at design time; the information comes from a
> database). Each form will take a little less than one page (not more) and
> should start with a new page. So I use a tag for a form (which includes
> several other tags). The problem is that when I use
> break-after/break-before properties, I always get an extra empty page. Can I
> get rid of this page?
> Thank you,
> Michael Aronov.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: page-breakes
Posted by Aaron Optimizer Digulla <di...@hepe.com>.
On Thu, Jan 11, 2001 at 11:34:27AM -0800, Michael Aronov wrote:
> My document can include several forms, and so the "form" tag will have
> several occurrences in the XML file. Each occurrence of this tag will
> generate a new page, regardless of where is there information for it or no.
> And if, for example, we have 10 occurrences, we will have 10 pages with text
> plus the empty eleventh page. If we use the "break-before" property
> instead, we still will have 11 pages, but with the empty first page. By the
> way, the earliest versions of Seagate Crystal Reports had a very similar bug
> (or feature :-) ).
I had the same problem. My solution was to use xsl:attribute and add
a page break only if <xsl:number count="form"> != 1 (I used break-before
for this reason).
Gives you a real headache when you want to create a TOC, though :-)
--
==============================================
Sowatec AG, CH-8330 Pfäffikon (ZH)
Witzbergstr. 7, http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, digulla@sowatec.com
==============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: page-breakes
Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 11:34 AM 1/11/01 -0800, Michael Aronov wrote:
>Hi Arved,
>I have read sections 4.8 and 7.18 of the spec, but it did not clarify the
>cituation. Here is the simplest example of the FO causing my (and Dan's,
>and probably others') problem. To simplify the case, I intentionally
>omitted all the properties, which usually one can find it a style sheet,
>like font-family, font-size, and so on.
[ SNIP ]
>My document can include several forms, and so the "form" tag will have
>several occurrences in the XML file. Each occurrence of this tag will
>generate a new page, regardless of where is there information for it or no.
>And if, for example, we have 10 occurrences, we will have 10 pages with text
>plus the empty eleventh page. If we use the "break-before" property
>instead, we still will have 11 pages, but with the empty first page. By the
>way, the earliest versions of Seagate Crystal Reports had a very similar bug
>(or feature :-) ).
>To implement the workaround proposed by Dan, I should have two kinds of
>"form" tag: with break and without break, and I should find a way to tell
>the servlet which produces the XMP file, that, say, the first row found in
>the table should generate a tag without break-before, and the rest of rows -
>with it.
>
>Thanks to all of you who found time for this issue.
>Sincerely,
>Michael Aronov.
Hi, Michael
Right, it sounds like I didn't test the case of break-before="page" on the
very first fo:block nor the case of break-after="page" on the last. Section
4.8 does actually specifically and completely mandate the behaviour you are
looking for.
This will be on my agenda for this weekend.
Regards,
Arved
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: page-breakes
Posted by Michael Aronov <ma...@entricom.com>.
Hi,
>
> i had the same problem and I used the following workaround: the first form
will
> not have a break-before property. I think this is something that needs to
be
> corrected in the actual FOP implementation. If a block is rendered on the
first
> page and has the break-before property it should not go to the next page.
>
> Best regards, Dan.
>
>
> I am not ruling out a FOP error, but breaks can be a bit
counter-intuitive.
> Read section 4.8 of the spec. If you are still convinced that we (I, since
I
> did the last work on breaks) are screwing up, please submit the FO and we
> can check it out.
>
> Regards,
> Arved Sandstrom
Hi Arved,
I have read sections 4.8 and 7.18 of the spec, but it did not clarify the
cituation. Here is the simplest example of the FO causing my (and Dan's,
and probably others') problem. To simplify the case, I intentionally
omitted all the properties, which usually one can find it a style sheet,
like font-family, font-size, and so on.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:svg="http://www.w3.org/2000/svg">
<xsl:template match="document">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="only"
page-height="11in" page-width="8.5in"
margin-left="0.75in" margin-right="0.75in"
margin-top="0.5in" margin-bottom="0.5in">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="only">
<fo:flow flow-name="xsl-region-body"
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="form">
<fo:block><xsl:apply-templates select="field-1"/></fo:block>
<!-- filds 2 through 9 go here -->
<fo:block break-after="page"><xsl:apply-templates
select="field-10"/></fo:block>
</xsl:template>
</xsl:stylesheet>
My document can include several forms, and so the "form" tag will have
several occurrences in the XML file. Each occurrence of this tag will
generate a new page, regardless of where is there information for it or no.
And if, for example, we have 10 occurrences, we will have 10 pages with text
plus the empty eleventh page. If we use the "break-before" property
instead, we still will have 11 pages, but with the empty first page. By the
way, the earliest versions of Seagate Crystal Reports had a very similar bug
(or feature :-) ).
To implement the workaround proposed by Dan, I should have two kinds of
"form" tag: with break and without break, and I should find a way to tell
the servlet which produces the XMP file, that, say, the first row found in
the table should generate a tag without break-before, and the rest of rows -
with it.
Thanks to all of you who found time for this issue.
Sincerely,
Michael Aronov.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: page-breakes
Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 07:20 PM 1/10/01 -0800, Michael Aronov wrote:
>Hallo,
>I am working now on a document, which will contain an arbitrary number of
>forms (the number is unknown at design time; the information comes from a
>database). Each form will take a little less than one page (not more) and
>should start with a new page. So I use a tag for a form (which includes
>several other tags). The problem is that when I use
>break-after/break-before properties, I always get an extra empty page. Can I
>get rid of this page?
I am not ruling out a FOP error, but breaks can be a bit counter-intuitive.
Read section 4.8 of the spec. If you are still convinced that we (I, since I
did the last work on breaks) are screwing up, please submit the FO and we
can check it out.
Regards,
Arved Sandstrom
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org