repeat(lambda { |pg| pg != 1 } , dynamic: true) do
#My header layout goes here..
end
Prawn::Document.generate("hello.pdf") do |doc| doc.repeat(lambda { |pg| pg != 1 } , dynamic: true) do
if (doc.page_number % 3) == 0
# Draw fancy stuff on every third page.
end
end
end