When you set the DocumentSource property, the document will be loaded async. This causes the behavior observed on your side. Basically, when the Print() method is called, the document is not loaded.
To achieve your requirement you can subscribe for the Loaded event of the PdfDocumentSource object and call the Print() method there.
sender, EventArgs e)
Note that you will need to delay the printing because the Document property of the PdfViewer is set a bit after the document is loaded. This is why there is a Dispatcher in the code snippet.
I hope this helps.
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.