This quick start gets you started with PrintDocument by letting you create a WPF application, add basic previewing control like the DocumentViewer to it.
To quickly get started using PrintDocument, follow these steps:
C# |
Copy Code
|
---|---|
using C1.C1Preview;
|
C# |
Copy Code
|
---|---|
private void button_Click(object sender, RoutedEventArgs e) { C1.C1Preview.C1PrintDocument doc = new C1.C1Preview.C1PrintDocument(); doc.Body.Children.Add(new RenderText("Hello World!")); documentViewer.Document = doc.FixedDocumentSequence; } |