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 Rob Sargent-4 <rs...@xmission.com> on 2012/05/07 00:02:02 UTC

textless pages

Thanks to a pointer from Chris Bowditch I'm using the fop trunk as of 2 days
ago to see if I can pull this off.

His hint on how to get the flow to skip a page:
<fo:simple-page-master master-name="nocontent">
<fo:region-body region-name="doesntexist"/>
</fo:simple-page-master>

My result:
The textless page is fine but it affects the next page(s).  Unfortunately I
get little or no text on the immediate following page(s) The correct textual
content is picked up a page(s) later. I'm wondering if anyone else out there
is using region-name like this in production (or plans to) or has seen my
problem and dealt with it at all.

I have one case where the output is perfect-pages, textless-page,
unintentional-textless page, another-one, textless-page,
perfectly-fine-pages-of-text.  Almost as if the textless-page is toggling
off-on the addition of text to the flow.

Or Vincent will get another nasty fo from me. :)

Thanks.


-- 
View this message in context: http://old.nabble.com/textless-pages-tp33763511p33763511.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: textless pages

Posted by Rob Sargent <rs...@xmission.com>.
Thanks Vincent.

I cannot make the exact match you suggest, since the size of the 
region-body on the next page is variable. (I could match then next, but 
not all.)

I will definitely trim down the textual content for a bug report.  I 
don't think fewer page definitions is tenable, however.

The alternative/work-around you mention (zero height unnamed 
region-body): Is this new behaviour in version 1.0.  I know I tried it 
in version 0.95 at the start of this project and didn't think to try it 
again when I moved to 1.0.

As always, thanks for you help
rjs




On 05/09/2012 05:15 AM, Vincent Hennebert wrote:
> Hi Rob,
>
> There’s a bug in the layout engine that doesn’t take the name of the
> region-body into account when breaking pages.
>
> In the example you attached, your empty page (from page-master
> "header-gallery6-page-3") appears to have a region-body of 28.08pt high.
> This is enough to fit 2 lines of text, which is what the
> PageBreakingAlgorithm does.
>
> At area creation time though, there is a test to check if the
> region-name of the current region-body matches the flow-name of the
> fo:flow the text belongs to. If it doesn’t, then the content is pushed
> to the next page. This creates a shift between what the layout engine
> does and what the area creator does.
>
> In the present case, the two-line content is pushed to the next page
> that can accommodate 20 lines or so, and the 20-line content that was
> supposed to be on that page is itself pushed to the following page that
> has full height (45-ish lines).
>
> Please report a bug at
> https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop
> It would be great if you could simplify your example as much as possible
> and attach it to the bug report.
>
> In the meantime, the following workaround might work: define the size of
> the empty page’s region-body to /exactly/ match the sizes of /all/ the
> following pages, until (I think) you insert a forced page break or start
> a new page sequence. The shift will still happen, but will be
> unnoticeable since the sizes of the region-bodies will all match.
>
> That said, in the provided example you can just remove the region-name
> property from the region-body of the "header-gallery6-page-3"
> page-master, and define margins on that region such that its height is
> zero (basically, change the margin-bottom from 0.01in to 0.40in). The
> empty body will be skipped by the layout engine, the area creator will
> create zero area for that page and both will agree, and you should get
> the result you expect.
>
>
> HTH,
> Vincent
>
>
> On 07/05/12 11:51, Rob Sargent wrote:
>> Attached a test fo
>>
>> On 05/06/2012 04:02 PM, Rob Sargent-4 wrote:
>>> Thanks to a pointer from Chris Bowditch I'm using the fop trunk as of 2 days
>>> ago to see if I can pull this off.
>>>
>>> His hint on how to get the flow to skip a page:
>>> <fo:simple-page-master master-name="nocontent">
>>> <fo:region-body region-name="doesntexist"/>
>>> </fo:simple-page-master>
>>>
>>> My result:
>>> The textless page is fine but it affects the next page(s).  Unfortunately I
>>> get little or no text on the immediate following page(s) The correct textual
>>> content is picked up a page(s) later. I'm wondering if anyone else out there
>>> is using region-name like this in production (or plans to) or has seen my
>>> problem and dealt with it at all.
>>>
>>> I have one case where the output is perfect-pages, textless-page,
>>> unintentional-textless page, another-one, textless-page,
>>> perfectly-fine-pages-of-text.  Almost as if the textless-page is toggling
>>> off-on the addition of text to the flow.
>>>
>>> Or Vincent will get another nasty fo from me. :)
>>>
>>> Thanks.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>


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


Re: textless pages

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Rob,

There’s a bug in the layout engine that doesn’t take the name of the
region-body into account when breaking pages.

In the example you attached, your empty page (from page-master
"header-gallery6-page-3") appears to have a region-body of 28.08pt high.
This is enough to fit 2 lines of text, which is what the
PageBreakingAlgorithm does.

At area creation time though, there is a test to check if the
region-name of the current region-body matches the flow-name of the
fo:flow the text belongs to. If it doesn’t, then the content is pushed
to the next page. This creates a shift between what the layout engine
does and what the area creator does.

In the present case, the two-line content is pushed to the next page
that can accommodate 20 lines or so, and the 20-line content that was
supposed to be on that page is itself pushed to the following page that
has full height (45-ish lines).

Please report a bug at
https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop
It would be great if you could simplify your example as much as possible
and attach it to the bug report.

In the meantime, the following workaround might work: define the size of
the empty page’s region-body to /exactly/ match the sizes of /all/ the
following pages, until (I think) you insert a forced page break or start
a new page sequence. The shift will still happen, but will be
unnoticeable since the sizes of the region-bodies will all match.

That said, in the provided example you can just remove the region-name
property from the region-body of the "header-gallery6-page-3"
page-master, and define margins on that region such that its height is
zero (basically, change the margin-bottom from 0.01in to 0.40in). The
empty body will be skipped by the layout engine, the area creator will
create zero area for that page and both will agree, and you should get
the result you expect.


HTH,
Vincent


On 07/05/12 11:51, Rob Sargent wrote:
> Attached a test fo
> 
> On 05/06/2012 04:02 PM, Rob Sargent-4 wrote:
>> Thanks to a pointer from Chris Bowditch I'm using the fop trunk as of 2 days
>> ago to see if I can pull this off.
>>
>> His hint on how to get the flow to skip a page:
>> <fo:simple-page-master master-name="nocontent">
>> <fo:region-body region-name="doesntexist"/>
>> </fo:simple-page-master>
>>
>> My result:
>> The textless page is fine but it affects the next page(s).  Unfortunately I
>> get little or no text on the immediate following page(s) The correct textual
>> content is picked up a page(s) later. I'm wondering if anyone else out there
>> is using region-name like this in production (or plans to) or has seen my
>> problem and dealt with it at all.
>>
>> I have one case where the output is perfect-pages, textless-page,
>> unintentional-textless page, another-one, textless-page,
>> perfectly-fine-pages-of-text.  Almost as if the textless-page is toggling
>> off-on the addition of text to the flow.
>>
>> Or Vincent will get another nasty fo from me. :)
>>
>> Thanks.

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


Re: textless pages

Posted by Rob Sargent <rs...@xmission.com>.
Attached a test fo

On 05/06/2012 04:02 PM, Rob Sargent-4 wrote:
> Thanks to a pointer from Chris Bowditch I'm using the fop trunk as of 2 days
> ago to see if I can pull this off.
>
> His hint on how to get the flow to skip a page:
> <fo:simple-page-master master-name="nocontent">
> <fo:region-body region-name="doesntexist"/>
> </fo:simple-page-master>
>
> My result:
> The textless page is fine but it affects the next page(s).  Unfortunately I
> get little or no text on the immediate following page(s) The correct textual
> content is picked up a page(s) later. I'm wondering if anyone else out there
> is using region-name like this in production (or plans to) or has seen my
> problem and dealt with it at all.
>
> I have one case where the output is perfect-pages, textless-page,
> unintentional-textless page, another-one, textless-page,
> perfectly-fine-pages-of-text.  Almost as if the textless-page is toggling
> off-on the addition of text to the flow.
>
> Or Vincent will get another nasty fo from me. :)
>
> Thanks.
>
>