import-bot (20211) [Avatar] Offline
#1
[Originally posted by johnod]

Hi,

How can I force a new page to be printed after x amount of array elements.

I've tried the e.HasMorePages = true but it doesn't work, it prints 2 pages on
top of each other then prints another 2 pages on top of each other etc..


Thanks In Advance
John
import-bot (20211) [Avatar] Offline
#2
Re: Printing Array of Strings
[Originally posted by eebrown]

John,

> How can I force a new page to be printed after x amount of array elements.
>
> I've tried the e.HasMorePages = true but it doesn't work, it prints 2 pages on
> top of each other then prints another 2 pages on top of each other etc..

Yes, e.HasMorePages is the right approach. Make sure you only print a single
page per PrintPage event handler. The handler prints a single page, then
returns to the system. If e.HasMorePages is true, then the PrintPage event
handler will be called again for subsequent pages.

So to force a new page, you need to:

1) Set e.HasMorePages to true.
2) Return from your current PrintPage event handler

Does this help? Let me know if you're still stuck here.

Erik