-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIRT 4.14 PDF output of dynamic text which does not fit on the page #1443
Comments
I think this is a bug. The behavior is as if the dynamic text item has page-break-inside: avoid set. |
@hvbtup Henning, you are able to provide a fix of that, it seems that you are familiar with that topic. @reiner-killet Could you provide an example again so that we have the same "error"-template. This would be great. |
@speckyspooky If you mean "are you able to provide a fix for that?" - I don't know. And this is low on my priority list ATM. I hope I find time to investigate further in October. @reiner-killet You can help us if you perform a binary search by download BIRT releases between 4.8 and 4.14 and see which release exactly introduced the issue. |
I have tried to produce the error with a very simple report based only with a "grid" and I tested with the mentioned properties 3 element: text-element (type: html), dynamic-text, label. But I didn't get your effect. So I think that there is an additonal component or configuration which cause your behavior. Result of the test reportI add my report perhaps you see the difference. The report includes 1 parameter Test report |
I failed to create a simple test case. The situation where I'm facing the issue is in a very complex report. Here I see the list header text "Beurteilung" on one side with huge free space below, and the comment text starts on the next space. @reiner-killet It would be really helpful if you can tell us the exact BIRT release where this behaviour change started. |
@reiner-killet Is the issue specific to an emitter, eg only with PDF output? |
Hi Henning,
only the PDF emitter shows this behavior.
The DOCX emitter works like in 4.8.
Enclosed please find template and data (w/o pictures).
The XML location should be c:\temp\birt.
The zip file contains a screenshot showing the Dynamic Data which was set to Display = Block for BIRT 4.8.
The zip file also contains a screenshot of the PDF output of BIRT 4.14 showing that the HTML text inserted is broken to page 2.
To achieve same behavior as 4.8 you must set Display = Inline.
Is this scenario helpful?
Thanks, Reiner
Von: Henning von Bargen ***@***.***>
Gesendet: Donnerstag, 5. Oktober 2023 14:42
An: eclipse-birt/birt ***@***.***>
Cc: Reiner Killet ***@***.***>; Mention ***@***.***>
Betreff: Re: [eclipse-birt/birt] BIRT 4.14 PDF output of dynamic text which does not fit on the page (Issue #1443)
@reiner-killet <https://github.com/reiner-killet> Is the issue specific to an emitter, eg only with PDF output?
—
Reply to this email directly, view it on GitHub <#1443 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWYBUAWX4CFZVFL5HY474J3X52TI5AVCNFSM6AAAAAA5MDYYVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYHAZDCMBVG4> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AWYBUAWWNYII2VOWDRUQ73LX52TI5A5CNFSM6AAAAAA5MDYYVGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTIHTSEC.gif> Message ID: ***@***.*** ***@***.***> >
|
@reiner-killet Probably you attached a ZIP file, but this doesn't work when replying by email. Please use the browser to upload the example. |
New trial: |
OK, I can reproduce the issue with your report. |
As a first step, I simplified the layout. This version still shows the issue: The note HTML text starts on the second page, but some lines would fit on the first page, so it should start there. |
Further simplification of the test report. |
I tested with some older BIRT releases downloaded from https://archive.eclipse.org/birt/downloads/drops/:
So this should give us at least an idea where to look in the commit logs... |
Short hint I tested the report from your side Henning and if the report will be started with the Viewer so the wrong page break is given too and if the DOCX is created from the viewer (instead) directly we will have the same effect. So we have the effect on the HTML-viewer side and on the PDF (in every case). |
This issue might be related to commit 16290e5 The goal of this commit was to fix BIRT bug 562873 PDF Rendering error with dynamic text item after page break. Part of the changes was: My gut feeling tells me this is related. A PR which tries to fixes this issue should also be tested with the report from bug 562873. |
Sigh... If I use the previous condition in the if statement shown above, this solves this issue, but results in bug 562873 again. |
Commit history related to this file that might help in understanding: 9827648 (2009) 2257c41 (2013) 16290e5 (2020) So the situation is like this:
I assume that setting @reiner-killet If you need this fixed, you should try to find a solution yourself. |
The workaround is to set DISPLAY = Inline in thousands of templates for all Dynamic Texts.
Von: Henning von Bargen ***@***.***>
Gesendet: Dienstag, 10. Oktober 2023 10:44
An: eclipse-birt/birt ***@***.***>
Cc: Reiner Killet ***@***.***>; Mention ***@***.***>
Betreff: Re: [eclipse-birt/birt] BIRT 4.14 PDF output of dynamic text which does not fit on the page (Issue #1443)
Commit history related to this file that might help in understanding:
<9827648> 9827648 (2009)
"Bug 28147 Page Break for contents in grid cells does not work correctly in PDF...":
This commit added the if statement which sets setPageBreakInside = avoid.
<2257c41> 2257c41 (2013)
"Fixed Page break added after large dynamic text within a table on PDF 53266":
This commit fixed avoided the page break by sharpening the condition in the if statement.
Unfortunately this resulted in bug 562873.
<16290e5> 16290e5 (2020)
"Fix BIRT bug 562873 PDF rendering error with dynamic item after page break":
This commit reverted the aforementioned commit, among others, resulting in the issue at hand.
So the situation is like this:
* There are two issues: bug 562873 and this one.
* We have got source code that fixes one of the issues but results in the other issue.
* Most of the other committers are busy, trying to get rid of outdated 3rd party libraries.
* ATM the situation with unwanted page breaks is still better than unreadable content.
* The source code is a djungle for me as well as for the other committers, I think.
* Unfortunately there is no high-level overview how it actually works.
I assume that setting pageBreakInside = avoid was not the right solution in the beginning.
But I'm out of ideas what to do instead.
@reiner-killet <https://github.com/reiner-killet> If you need this fixed, you should try to find a solution yourself.
As a workaround, you can try to split your HTML note into lines somehow and use a list item to iterate over them.
—
Reply to this email directly, view it on GitHub <#1443 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWYBUATZJ3DIZYKZBANIB7TX6UDD3AVCNFSM6AAAAAA5MDYYVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJUG4YTENZVG4> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AWYBUAUQ2FIG3YS73Y575QDX6UDD3A5CNFSM6AAAAAA5MDYYVGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTIS3FLK.gif> Message ID: ***@***.*** ***@***.***> >
|
I started a smaller research on the original report from your side Henning which cause the change. Gird with margin-top and moved 1st line of dynamic textDanymic text with margin-top and moved 1st line |
If I add a 1px border to the master page and set margin-top of the Problem-Grid to 30mm, then print the second page, I can see that yellow area starts 58mm below the page border-top, which is correct (28mm page header height + 30mm margin-top for the grid). But the first line is written approx. 25mm below the start of the yellow area. And the 1pt padding-top of the cell seems to be ignored. |
If the "misplaced first line" issue from bug 562873 occurs is depending at least on
But I don't see a pattern. |
I added a simplified example report demonstrating bug 562873 in extrem form. The first line is written even below the second and third line (assuming the if-statement is commented). |
I have a suggestion for an solution/fix. The reason at all is the thinking of the caluclation. Long text, short suggestion of LineArea:
My results looks good. Yes we need some further tests. The risk here is limited at the LineArea and has no effect on other area-container. @hvbargen |
Looks good to me. @speckyspooky The patch is basically what you suggested, plus:
It tested the two reports with the PDF, DOCX and HTML emitters, and with the web viewer.
|
I have created th PR #1449 to fix it. |
The issue is solved with PR #1449 |
Can I test the fix in the nightly build?
Von: Thomas Gutmann ***@***.***>
Gesendet: Samstag, 14. Oktober 2023 18:05
An: eclipse-birt/birt ***@***.***>
Cc: Reiner Killet ***@***.***>; Mention ***@***.***>
Betreff: Re: [eclipse-birt/birt] BIRT 4.14 PDF output of dynamic text which does not fit on the page (Issue #1443)
The issue is solved with PR #1449 <#1449>
—
Reply to this email directly, view it on GitHub <#1443 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWYBUAXRZGPEPYTBCPULW4LX7KZ2PAVCNFSM6AAAAAA5MDYYVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTGAYDKNBTGA> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AWYBUAV4NFMMWV3GAVYTVO3X7KZ2PA5CNFSM6AAAAAA5MDYYVGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJCVJ7M.gif> Message ID: ***@***.*** ***@***.***> >
|
Currently there are some issues with the eclipse-designer/rcp-report-designer. The nightly built has an issue with the viewer component so you won't be able to create a preview. BUt if you have an own integration you can use the runtime for testing. |
Is it in the most recent RCP designer, meanwhile? |
The work is currently concentrated at the Jetty-migration for the web-viewer and if it is done you can test it. |
Hi developers,
is the following change in behavior intended or is it a bug?
A grid or table cell contains a dynamic text.
The HTML is longer than the page.
The
Page Break
properties of the table row is set toInside : avoid
.The
General
properties of he Dynamic Text are set toDisplay : Block
.In BIRT 4.8 the Dynamic Text starts on the current page (if there is no object like an image that prevents that).
In BIRT 4.14 the Dynamic Text starts on the next page.
To let 4.14 start the Dynamic Text on the first page like 4.8 the General properties must be changed to
Display : Inline
.Thanks, Reiner
The text was updated successfully, but these errors were encountered: