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 "Tim (JIRA)" <ji...@apache.org> on 2018/01/26 08:23:01 UTC

[jira] [Commented] (FOP-2684) NoSuchElementException in LMiter.next() with page breaks and different page masters

    [ https://issues.apache.org/jira/browse/FOP-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340700#comment-16340700 ] 

Tim commented on FOP-2684:
--------------------------

We recently ran into this error again, after removing a block element from a 3 pages long document.

The problem was: By removing a 5mm height block element, we caused an page-break to appear in a 3 lines long list-item.

 

If you don't know about this bug, it is quite frustrating to debug, since the transformer reports the error on the containing main template element.

We found these workarounds to most usecases:
 # Set page-break-inside="avoid" as attribute on the list-item elements. Forces the page-break before the list-item, when it would occure inside of the list-item.
 # Set page-break-before="always" as attribute on the list-block element. Forces the page-break before the list-block, when it would occure anywhere inside of the list.
 # Use normal block elements instead of list-block and make it look like a list.

As a result, your layout might suffer and you have to tinker around with page-break strategies.

 

> NoSuchElementException in LMiter.next() with page breaks and different page masters
> -----------------------------------------------------------------------------------
>
>                 Key: FOP-2684
>                 URL: https://issues.apache.org/jira/browse/FOP-2684
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Windows 10, jdk1.8.0_112 (64bit)
>            Reporter: Michael Klein
>            Priority: Major
>         Attachments: Exception.fo, Stacktrace.txt
>
>
> I have a big FO instance which results in a NoSuchElementException.
> To reproduce this issue, I was able to created a simple FO with different page masters for left and right pages and a list at the end of the first page which first item is too long for be rendered on the first page.
> When using a simple page master for all pages or a block instead of a list item, everything works as expected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)