Bug 301590 - Page break issues on PDF
Summary: Page break issues on PDF
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-02 15:02 EST by Klaus Meisl CLA
Modified: 2018-09-20 08:55 EDT (History)
7 users (show)

See Also:


Attachments
how it is now (55.40 KB, image/png)
2010-02-02 15:02 EST, Klaus Meisl CLA
no flags Details
what it should look like... (37.45 KB, image/jpeg)
2010-02-02 15:12 EST, Klaus Meisl CLA
no flags Details
auto pagebreak header and detail row 1 (pic1) (56.25 KB, image/png)
2010-02-23 04:39 EST, Klaus Meisl CLA
no flags Details
auto pagebreak header and detail row 1 (pic2) (34.02 KB, image/png)
2010-02-23 04:43 EST, Klaus Meisl CLA
no flags Details
The report design file (67.82 KB, application/octet-stream)
2010-07-20 04:26 EDT, Katerina CLA
no flags Details
The datasource XML file (708 bytes, application/xml)
2010-07-20 04:27 EDT, Katerina CLA
no flags Details
The produced pdf (4.35 KB, application/pdf)
2010-07-20 04:40 EDT, Katerina CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Meisl CLA 2010-02-02 15:02:12 EST
Created attachment 157954 [details]
how it is now

Hi,
i have several issues with page break in PDF.
As you can see in my attachment, there is a table with a header, and two detail rows.
I set avoid page break after the header and after detail row 1. I set it to auto in detail row 2. It does not work. The headers and detail row 2 would partly fit on the first page, but it does a page break.

If i have a text in detail row 2 which is about 2 pages long, it prints header group 1 on one page (and leaves the rest blank), header group 2 with detail row 1 on the next page (and leaves the rest blank) and detail row 2 on a third/fourth page.

It always tries to avoid breaking the text in detail row 2 - until it has to because the text would be too long.
Comment 1 Klaus Meisl CLA 2010-02-02 15:12:04 EST
Created attachment 157958 [details]
what it should look like...
Comment 2 Klaus Meisl CLA 2010-02-02 15:12:54 EST
i tried fixed and auto layout, the same behaviour. which would be the best??
Comment 3 Wenfeng Li CLA 2010-02-22 12:22:41 EST
(In reply to comment #2)
> i tried fixed and auto layout, the same behaviour. which would be the best??

Can you try remove the "avoid page break" in both header and detail row 1?
Comment 4 Klaus Meisl CLA 2010-02-23 04:39:20 EST
Created attachment 159896 [details]
auto pagebreak header and detail row 1  (pic1)
Comment 5 Klaus Meisl CLA 2010-02-23 04:43:09 EST
Created attachment 159898 [details]
auto pagebreak header and detail row 1  (pic2)

looks better. but the text from page 2 in pic1 should fit under "Information   Meeting Minutes Capture", shouldn't it?

still missing the avoid pagebreak in pic2 after "5.2 Next Meeting".
Comment 6 Wenfeng Li CLA 2010-02-23 14:24:37 EST
(In reply to comment #5)
> Created an attachment (id=159898) [details]
> auto pagebreak header and detail row 1  (pic2)
> looks better. but the text from page 2 in pic1 should fit under "Information  
> Meeting Minutes Capture", shouldn't it?
> still missing the avoid pagebreak in pic2 after "5.2 Next Meeting".

DO you still have any "page break avoid" set in the report design?

On the 2nd issue, do you want to have ""5.2 Next Meeting" starting on a new page instead of at the last line of the page?
Comment 7 Klaus Meisl CLA 2010-02-23 17:11:05 EST
1) i checked the xml-source. there was a hidden "page break avoid" which i set to auto, but it didn't change anything. So now there aren't any avoid-pagebreaks in the _whole_ report.

2) as you can see in pic1 there's a white space after 5.2. There the text from page 2 should start and auto-break at the end of the page. If this is not possible point 5.2 should start on the next page.
Comment 8 Wenfeng Li CLA 2010-02-23 19:19:23 EST
> 2) as you can see in pic1 there's a white space after 5.2. There the text from
> page 2 should start and auto-break at the end of the page. If this is not
> possible point 5.2 should start on the next page.

I can see the issue in pic1.    On pic2, after removing the page break avoid, ""5.2 Next Meeting" is the last line of the page.  Are you wanting to have it on a new page?
Comment 9 Klaus Meisl CLA 2010-02-24 08:13:59 EST
please note that the inscription in pic1 is wrong, pic2 is correct! (there is 1 group header row (5, 5.1 ...) and 2 detail rows)

there should be no page break between a subtitle (like 5.x -> "5.2 Next Meeting" here), the following subheader (here "Information     Next Meeting") and the detailed description ("09/22/2009"). Also there should be no page break between Top title (1, 2, 3) and the following FIRST subtitle.
hope it gets clear
Comment 10 Wenfeng Li CLA 2010-02-24 12:22:52 EST
Glad to know that pic2 is correct.   So by removing the page-break-avoids, the report output is correct as shown in pic2. the issue has been resolved?
Comment 11 Klaus Meisl CLA 2010-02-24 15:45:33 EST
no, it's not resolved. my description (header row, detail row... the red text) in pic1 is wrong. the description in pic2 is ok.
Comment 12 Wenfeng Li CLA 2010-02-26 04:21:57 EST
(In reply to comment #11)
> no, it's not resolved. my description (header row, detail row... the red text)
> in pic1 is wrong. the description in pic2 is ok.

In the report design that generates pic1, is there a page-break-avoid set to true on the table header or detail row?
Comment 13 Klaus Meisl CLA 2010-02-26 05:29:17 EST
(In reply to comment #12)
> (In reply to comment #11)
> > no, it's not resolved. my description (header row, detail row... the red text)
> > in pic1 is wrong. the description in pic2 is ok.
> 
> In the report design that generates pic1, is there a page-break-avoid set to
> true on the table header or detail row?

it's set in the header row: "After: avoid"

if i set the first detail row to "After: avoid", 5.1 and the "Information ..." line is drawn to the next page and the text ".... bigger ...." is drawn on the next page, so there is a big white space.
Comment 14 Wenfeng Li CLA 2010-02-26 18:00:30 EST
so removing the page break avoid in the header row and detail row solve the problem, right?
Comment 15 Klaus Meisl CLA 2010-02-27 07:07:19 EST
(In reply to comment #14)
> so removing the page break avoid in the header row and detail row solve the
> problem, right?

it will solve the problem that there's a big white space after "Information ...". but the problem from pic1 remains. I could send you the generated PDFs per mail...
Comment 16 Wenfeng Li CLA 2010-02-27 15:20:53 EST
(In reply to comment #15)
> (In reply to comment #14)
> > so removing the page break avoid in the header row and detail row solve the
> > problem, right?
> it will solve the problem that there's a big white space after "Information
> ...". but the problem from pic1 remains. I could send you the generated PDFs
> per mail...

Is the problem in pic1 == "a big white space after "Information ..."?

Is pict2 an BIRT output PDF file?
Comment 17 Klaus Meisl CLA 2010-03-01 08:55:20 EST
(In reply to comment #16)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > so removing the page break avoid in the header row and detail row solve the
> > > problem, right?
> > it will solve the problem that there's a big white space after "Information
> > ...". but the problem from pic1 remains. I could send you the generated PDFs
> > per mail...
> 
> Is the problem in pic1 == "a big white space after "Information ..."?
> 
> Is pict2 an BIRT output PDF file?

both are PDF files. in pic1 the problem is the white space after "Information...". there the text from page 2 should begin and auto-break at the end of page 1
Comment 18 Wenfeng Li CLA 2010-03-01 12:19:40 EST
sorry, I am not sure I understand what the bug is.   

I understand there is issue with pic1.    But it appears pic2 is ok.   Is pic2 an output from BIRT?  if so, what is the bug with pic2?
Comment 19 Klaus Meisl CLA 2010-03-02 05:28:31 EST
(In reply to comment #18)
> sorry, I am not sure I understand what the bug is.   
> 
> I understand there is issue with pic1.    But it appears pic2 is ok.   Is pic2
> an output from BIRT?  if so, what is the bug with pic2?

pic2 is a BIRT output. I set "page break after: avoid" to the header "5.2 Next Meeting", but as you can see there's a page break...
Comment 20 Gang Liu CLA 2010-03-03 02:28:09 EST
If you want to keep the group in one page, you should set page-break-inside: avoid on the group.
I'm clear what's your reqrirement, Could you please create a report design based on sample DB to show this issue?
Comment 21 Katerina CLA 2010-07-20 04:26:34 EDT
Created attachment 174707 [details]
The report design file
Comment 22 Katerina CLA 2010-07-20 04:27:15 EDT
Created attachment 174708 [details]
The datasource XML file
Comment 23 Katerina CLA 2010-07-20 04:27:31 EDT
Hello,
I have similar problems with page breaks, with BIRT 2.5.1 or BIRT 2.6.0. I have a table at the top of the report, which is a kind of header for it, and takes its data from an XML file. Below it I have a single Dynamic Text Field which takes HTML code as input. If the produced HTML output is longer than one page (it does not fit under the header in one page) then it is automatically moved to the next page. That leaves the header alone in the first page. I have tried to set Avoid page break wherever I could, but no change. How can I force the HTML content to break, instead of always breaking before it? I attach the report and the XML file used as its data source. 
Thanks for looking at it.

Katerina
Comment 24 Katerina CLA 2010-07-20 04:40:19 EDT
Created attachment 174713 [details]
The produced pdf
Comment 25 Xiaoying Gu CLA 2010-08-26 02:50:38 EDT
(In reply to comment #23)
> Hello,
> I have similar problems with page breaks, with BIRT 2.5.1 or BIRT 2.6.0. I have
> a table at the top of the report, which is a kind of header for it, and takes
> its data from an XML file. Below it I have a single Dynamic Text Field which
> takes HTML code as input. If the produced HTML output is longer than one page
> (it does not fit under the header in one page) then it is automatically moved
> to the next page. That leaves the header alone in the first page. I have tried
> to set Avoid page break wherever I could, but no change. How can I force the
> HTML content to break, instead of always breaking before it? I attach the
> report and the XML file used as its data source. 
> Thanks for looking at it.
> 
> Katerina

Katerina,

The issue you met has been reported in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=323222