wpfprintingxpsdocumentvisual-treedocumentpaginator

WPF Printing large custom control


I'm sorry if this is a duplicate, but I couldn't find anything relating to it.

I'm trying to create an XpsDocument from a custom control that I have. The custom control already defines properties for a header and a footer, along with the body.

The idea is to be able to use that same control (or derivatives of it) as an input to some custom DocumentPaginator that will create a printer-ready version of that "report", with the header and the footer put on every page, and the controls, inside the body, showing in full (I don't want to create a bitmap of the whole control, then scale it and cut it where the page ends).

Any ideas on how I can split the contents of a user control into pages? Or suggestions on a different way to achieve the printing of the control onto pages?

Thanks a lot in advance


Solution

  • Check of VisualDOcumentPaginator; http://www.codeproject.com/Articles/164033/WPF-Visual-Print-Component