Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330784

Summary: Orphans and Widows not working
Product: z_Archived Reporter: pp
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: CLOSED DUPLICATE QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, xwang
Version: 2.6.0   
Target Milestone: 3.7.0   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Example of the bug
none
Output of the example none

Description pp CLA 2010-11-22 05:32:58 EST
Build Identifier: I20100608-0911

The properties orphans and widows don't work as expected (http://www.w3.org/TR/CSS2/page.html#break-inside).

I'm using PDF-Output.

I've attached an example:
Orphans is set to 2 (default), but there is a pagebreak after the first line.

I don't know if it would work for HTML-Content because of bug 323222, but for plain text it doesn't work.

Reproducible: Always

Steps to Reproduce:
1. Add a text-element with some lines of text in it
2. Move the text-element to the bottom of the page, that there is only space for on row left
3. Render with PDF-Output
Comment 1 pp CLA 2010-11-22 05:34:26 EST
Created attachment 183558 [details]
Example of the bug
Comment 2 Xiaodan Wang CLA 2010-11-22 22:25:46 EST
Peter,

According to the definition in the following page: http://www.w3.org/TR/CSS2/page.html#propdef-widows, 'widows' property specifies the minimum number of lines in a block element that must be left at the top of a page.

In your example, "widows" is set to 2, it means 2 lines of the text is shown in the 2nd page at least and that is the actual result in the latest build.

Could you please provide more info about your issue? That would be more helpful, thanks.
Comment 3 pp CLA 2010-11-23 03:55:10 EST
(In reply to comment #2)
> Peter,
> According to the definition in the following page:
> http://www.w3.org/TR/CSS2/page.html#propdef-widows, 'widows' property specifies
> the minimum number of lines in a block element that must be left at the top of
> a page.
> In your example, "widows" is set to 2, it means 2 lines of the text is shown in
> the 2nd page at least and that is the actual result in the latest build.
> Could you please provide more info about your issue? That would be more
> helpful, thanks.

My example shows, that the "orphans"-property is not working correctly.

"The 'orphans' property specifies the minimum number of lines in a block element that must be left at the bottom of a page"

"orphans" is set to 2, but there is only one row (of the text) left on the page (I'll attach my output).
Comment 4 pp CLA 2010-11-23 03:56:45 EST
Created attachment 183643 [details]
Output of the example
Comment 5 Xiaoying Gu CLA 2010-11-24 05:35:41 EST
I think this is a duplicated one of bug 330996.

If you only keep one column in the grid, the output effect is correct that all the line of text will be output to the next page, since there is no space in the 1st page to draw 2 lines (by orphans setting).

But due to the multi-columns in the grid, the orphans/Widows settings for page break doesn't work.
Comment 6 pp CLA 2010-11-24 09:15:06 EST
(In reply to comment #5)
> I think this is a duplicated one of bug 330996.
> If you only keep one column in the grid, the output effect is correct that all
> the line of text will be output to the next page, since there is no space in
> the 1st page to draw 2 lines (by orphans setting).
> But due to the multi-columns in the grid, the orphans/Widows settings for page
> break doesn't work.

With only one column orphans and widows behave as I expect, thanks.
Comment 7 Xiaoying Gu CLA 2010-11-24 21:37:13 EST

*** This bug has been marked as a duplicate of bug 330996 ***