Question

In short: Can anyone help me in printing a FlowDocument which may span to multiple pages with the same watermark image in every page? My current implementation prints the watermark in first page only. How to do some kind of templating in this scenario?

Description: I am building a WPF application which prints a FlowDocument. The FlowDocument contains an image used as the watermark and the document will be printed in one or more pages according to the length of the content. Everything is working fine at the first page. I want the same image to be used in all pages as watermark which currently is not happening. I think I have to work on DocumentPaginator object, but I am not sure how to get this done. Anyone experienced in FlowDocument printing with the above scenario that sounds like template based printing?

Was it helpful?

Solution

Yeah! I found a solution finally. It was in XAML. Actually I was trying to do this for printing purpose so that every page in the printout contains the watermark image or text. In FlowDocumentPaginator there are templates to define sections like header and footer. You can make use of them to achieve this when printing. I successfully did this for printer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top