this will be hard to explain for me, but I try.
In a For / Next lop, I draw some header, core date and footer.
Header and core data have background colors.
header background color and footer (default background color: white) appears correctly, as I code them.
But, in the last page, when the core data does not fill it (only a bunch of lines on my two testing text files), the last line with text are followed by empty lines of background color (the same color used by the last line with text).
Here is an example of the generated pdf.
Go directly to the last page and you will see line 185 with a blue background and the last part of the page filled with the same nice blue background. If I remove the entry numbered 185 (and then have the entry 184 with a light yellow background), the empty background will have its light yellow background color.
As you understand between the lines, the printing stops when the loop prints the last line of text; the for next loop looks like (pseudo code):
[code]For LoopIdx = 0 to ListBox # Of Rows (-1 because 0-Based)
If a variable is 1 (for line #1):
print the header (with a light green color background and a line of text - the ListBox heading strings)
print the contents of Row(LoopIdx) using a 2 colors background (light yellow and light blue)
If the number of printed lines fills the page
print the footer (without a color background; the text is the current date and time, centered)
reset some variables
issue a next page
If UserCancelled Then Exit
I print a last footer after the loop without background color. (same footer used above in the loop)
Why do I get those extra background colored lines ?
PS: depending on the number of lines, I can have just two lines in excess and the remainding of the page is white.
OS X 10.10.2