Thanks Brad. I now have it working. Thought I'd post it to help someone else.
...
... generate pages 1..N here
...
This generates an array that looks like this:
[[2, 3], [4, 6], [7, 11], [12, 14], [15, 15], [16, 17], [18, 19], [20, 22]]
Then at the end of my document generation, this is the last thing I do:
@section_page_numbers_array.each do |x, y|
string = "TRANSACTIONS BY FUND - PAGE <page> OF <total>"
total_pages = y-x+1
options = { :at => [bounds.right - 300, 10],
:width => 300,
:align => :right,
:page_filter => (x..y),
:total_pages => total_pages,
:start_count_at => 1,
:style => :bold }
number_pages string, options
end
This goes back and adds the footer with the appropriate page start# (always 1) and end# (total_pages) to the footer of each section.