c# - create printbatch to print multiply flowdocuments -


How to print multiply flowddomets in a batch? The following code should print different documents but should be printed. This sample works only properly if you print on the XPS printer.

  var printDialog = new PrintDialog (); If (printDialog.ShowDialog () == true) {var xpsDocumentWriter = PrintQueue.CreateXpsDocumentWriter (printDialog.PrintQueue); Fork (different person in person) {var doc = Application.LoadComponent (new Uri ("Template.xaml", Urikkind.Relative)) as a flow document; Doc.DataContext = Individual; Var paginator = ((IDocumentPaginatorSource doc) .DocumentPaginator; XpsDocumentWriter.Write (paginator); }}  

assigning DataContext to thread these issues After doing this, make sure the thread uses its waiting queue:

  Dispatcher. Current Dispatch Invoc (Dispatcher Propagata. System Idel, new Dispatcher Operation Callback (_ = & gt; null), zero);  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -