Hi all,
I've just submitted a pull request for a follow-up fix of the 'First page should be a right page' commit from February
that is already merged in master:
https://github.com/flyingsaucerproject/flyingsaucer/pull/25
This makes sure that the PageBox class behaves in the same way and also treats the first page as a right page. Below is
a copy of the pull request description including a HTML sample that shows the issue.
Please review.
Thanks,
Jens
Copy of the pull request description:
-------------------------------------------------------------------------------------------------------
Follow-up commit for 74029785c59ba8c816aaeb40aef6eeac67ae37a3: First page should be a right page
The PageBox class was not aware of the changes in the aforementioned commit and still handled the first page as a left
page. This commit fixes this by swapping the implementations of PageBox.isLeftPage() and PageBox.isRightPage().
Here is some sample HTML for testing this. Before the fix the divs with page-break-before:right started on a left page,
after applying the fix they correctly start on a right page.
<html xmlns="
http://www.w3.org/1999/xhtml" xmlns:html="
http://www.w3.org/1999/xhtml">
<head>
<style>
@page :left {
background-color: yellow;
}
@page :right {
background-color: green;
}
div.toc, div.content {
page-break-before: right;
}
</style>
</head>
<body>
<div class="titlepage">
<h1>test document</h1>
</div>
<div class="toc">
<p>some text</p>
</div>
<div class="content">
<p>more text</p>
</div>
</body>
</html>