Reputation: 1068
i have to print my form but it is big to enter in only one page so i need to print it in 2 pages ,my poor knowledge allow me to know how print one page but hot how print in multipage . Do you have any advice how i can print in multipage,all kind of help will be appreciate.
Thanks.
Good Work
Upvotes: 3
Views: 2040
Reputation: 46595
You need to override the DocumentPaginator class.
This blog post helped me get it working.
What I did was create a UserControl
that would show one page's (any of the pages) worth of data.
Then in the override for GetPage
I created the UserControl
(passing it the page number to render), then measured and arranged it (using the PageSize
from the DocumentPaginator
), and returned it as a DocumentPage
(by passing it to the constructor of DocumentPage
).
Then you need to override PageCount
and PageSize
, so that when PageSize
is updated, the PageCount
is changed.
Upvotes: 1