Nice to see Report4PDF being used.
The cell page break code checks to see if a cell will fit on the current page, given where the current Y value is, using #checkFitSpacingTop:
If the cell is too tall, a page break is triggered. So the interesting question is why was the cell considered too tall for the remaining page height.
Since you know which page has the first problem, you can put a conditional break which checks the #currentPageNumber in R4PBuilder>>buildCell: just prior to #checkFitSpacingTop:
The #resetCurrentYAfter: wrapper method is used to go back to the previous Y value after a cell is done being built. That way the next cell is a row is placed in the correct vertical position.
You can send #traceToTranscript or #traceToFile: to the report to see what the output is. The trace shows the calculated page height which is used by R4PCell>>canBuildAt:limit:
If you can generated an example that causes the problem I'd be happy to look into it.
Hope you find this helpful,
From: Ivo Roefs <ivo.roefs@xxxxxxxxx>
Sent: Wednesday, August 15, 2012 5:58:11 AM
Subject: [pdf4st] unwanted page breaks
I've been exploring Report4PDF (PDF4Smalltalk)....This looks very
I'd like to congratulate the people who put all their effort into
I bumped into a small problem.
As you can see (hopefully) in this screenshot...after 12 pages of
correct behaviour.... suddenly there's an unexpected page break
after the first cell.
Also for the next three columns there's this unexpected page break.
It appears that with the problematic cells, that they start slightly
higher than on other pages.
After that everything's fine again for a number of pages, and then
the same problem gets repeated.
I've been looking into some methods like, #checkFitSpacingTop:
#findPageToFitRowTop:, but I really don't know what to look for.
Can anyone give any pointers what could be wrong here?