flowdocumentscrollviewer

How can I produce a “print preview” of a FlowDocument in a WPF application?

拈花ヽ惹草 提交于 2019-12-17 07:06:34
问题 Various WPF applications of mine display FlowDocument's. I'm able to print them, using the approach described in the answer to Printing a WPF FlowDocument. Now I'd like to add a "print preview" capability. In the normal case, I am printing the FlowDocument that is displayed in the Window, and so I wouldn't need a Print Preview then. But in some cases the FlowDocument to print is constructed on-the-fly in memory. And in these cases I'd like to display it before printing. Now, I can certainly

Print flowdocument scroll viewer on multiple pages

房东的猫 提交于 2019-12-11 01:08:51
问题 I'm trying to print my FlowDocument (which is wrapped into a FlowDocumentScrollViewer) because I have a lot of texts/Textbox/combobox and the page height can become high ! I'm using this : PrintDialog printDialog = new PrintDialog(); if (printDialog.ShowDialog() == true) { Scrollvvv.Document.ColumnWidth = printDialog.PrintableAreaWidth; Scrollvvv.Document.ColumnGap = 0; printDialog.PrintDocument(((IDocumentPaginatorSource)Scrollvvv.Document).DocumentPaginator, ServicesLangue.RM.GetString(

How can I produce a “print preview” of a FlowDocument in a WPF application?

柔情痞子 提交于 2019-11-27 03:04:28
Various WPF applications of mine display FlowDocument's. I'm able to print them, using the approach described in the answer to Printing a WPF FlowDocument . Now I'd like to add a "print preview" capability. In the normal case, I am printing the FlowDocument that is displayed in the Window, and so I wouldn't need a Print Preview then. But in some cases the FlowDocument to print is constructed on-the-fly in memory. And in these cases I'd like to display it before printing. Now, I can certainly pop a new window and display the FlowDocument, but I want the preview to really feel like it is part of