I have a huge data which I want to print using WPF. I found that WPF provides a
I'm assuming your report is displayed in a
DataGrid or something else that is scrollable?
FlowDocument is definitely your best choice here if you want to print something that looks, for lack of a better word, professional. But if you want something quick and dirty, you could use a series of operations using
RenderTargetBitmap.Render. The basic process would be:
ScrollViewerthat's containing the "large" control
Again, don't call
RenderTargetBitmap.Render on the "large" control. Wrap the large control in a
ScrollViewer if it isn't already. That will essentially be your paginator.
I don't know if you'll be satisfied with the results, but this is the easiest method I can think of. It'll look like you manually hit
PrintScreen each time. Not sure if that's what you want, but if you want it to look nicer, I think you need to use