John,
There are some examples in the VS projects. In short you use a
PrintDocument subclass and keep the datastream position either in a class
variable for that subclass or, if you are just providing OnPrintPage
handling to the standard PrintDocument, in a class variable. Everytime you
get to the bottom of the page and there is more data set HasMorePages to
true and return. If you are going to use print preview and printing make
sure to handle OnBeginPrint and reset the position of your print stream back
to the beginning there so it can print to the printer from the preview if
desired.
I've found it easiest to make a complete subclass of PrintDocument and
implement OnBeginPrint, OnEndPrint, and OnPrintPage for all my documents. I
store my data stream and the current position in class variables. I
allocate all my custom Fonts and Pens in OnBeginPrint and then deallocate
them in OnEndPrint. If you have documents that change orientation within
them you can implement OnQueryPageSettings as well.
Ron Allen
"John Sutor" <jo********@cinfin.com> wrote in message
news:ed**************@TK2MSFTNGP11.phx.gbl...
Does anyone know how to print multiple page documents? I can print from a
test box or a one page document, but not one with multiple pages.