Skip to content

Commit

Permalink
Don't trim first page when rendering to print media. Thanks to mgu.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbrant committed Jan 13, 2010
1 parent 0ffd941 commit a575474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java/org/xhtmlrenderer/layout/Layer.java
Expand Up @@ -884,7 +884,7 @@ public void trimEmptyPages(CssContext c, int maxYHeight) {
// Empty pages may result when a "keep together" constraint
// cannot be satisfied and is dropped
List pages = getPages();
for (int i = pages.size() - 1; i >= 0; i--) {
for (int i = pages.size() - 1; i > 0; i--) {
PageBox page = (PageBox)pages.get(i);
if (page.getTop() >= maxYHeight) {
if (page == getLastRequestedPage()) {
Expand Down

0 comments on commit a575474

Please sign in to comment.