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 the printing operation, and not just another Window in the app.
I don't want a normal FlowDocument in a FlowDocumentScrollViewer. Rather than being "any size" it needs to be constrained to the size of the paper, a specific HxW ratio, and paginated.
Suggestions?
should I just use a standard Window, and in that case, how to I ensure the FlowDocument is at the proper ratio?
is there a more "integrated" way to do the preview within the scope of the PrintDialog UI that is part of Windows?
Thanks