I need to dispay text for user before printing and allow to print it. I try to use DocumentViewer, but can't find example to display simple Text. Only Word or XPS, but it's overgear solutions.
Is there any way to print simple multiline text throw DocumentViewer
var printText = @"Multiline text to view and print
Line1 Content
Line2 Content
";
and View
<DocumentViewer>
<FixedDocument></FixedDocument>
</DocumentViewer>
How to make this work ?
A FlowDocument?
<FlowDocumentReader xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FlowDocument>
<Paragraph>
<Bold>Some bold text in the paragraph.</Bold>
Some text that is not bold.
</Paragraph>
<List>
<ListItem>
<Paragraph>ListItem 1</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 2</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 3</Paragraph>
</ListItem>
</List>
</FlowDocument>
</FlowDocumentReader>