1 // XpsPrint SDK Sample - XpsPrintHelper.cs
2 // Copyright (c) Microsoft Corporation. All rights reserved.
5 using System
.Collections
.Generic
;
7 using System
.IO
.Packaging
;
9 using System
.Windows
.Controls
;
10 using System
.Windows
.Documents
;
11 using System
.Windows
.Documents
.Serialization
;
12 using System
.Windows
.Media
;
13 using System
.Windows
.Xps
;
14 using System
.Windows
.Xps
.Packaging
;
15 using System
.Windows
.Xps
.Serialization
;
19 namespace SDKSampleHelper
21 // ----------------------- class AsyncSaveEventArgs -----------------------
23 /// Event arguments class for asynchronous print events.</summary>
24 public class AsyncPrintEventArgs
: EventArgs
26 private String _status
;
27 private bool _completed
;
31 get { return _status; }
36 get { return _completed; }
39 public AsyncPrintEventArgs(String status
, bool completed
)
41 _completed
= completed
;
44 }// end:class AsyncSaveEventArgs
47 // ------------------------- class XpsPrintHelper -------------------------
48 public class XpsPrintHelper
50 internal delegate void AsyncPrintChangeHandler(
51 object printHelper
, AsyncPrintEventArgs asycnInformation
);
53 internal event AsyncPrintChangeHandler OnAsyncPrintChange
;
56 public XpsPrintHelper(String contentPath
)
58 _wpfContent
= new WPFContent(contentPath
);
59 _contentDir
= contentPath
;
61 #endregion Constructors
63 #region Print Interface
64 // -------------------------- GetPrintDialog --------------------------
66 /// Displays a printer dialog that allows the
67 /// user to chose the printer to output to.</summary>
69 /// The print dialog with the results of the user selection;
70 /// or NULL if the user clicks "Cancel" to the dialog.</returns>
71 public PrintDialog
GetPrintDialog()
73 PrintDialog printDialog
= null;
75 // Create a Print dialog.
76 PrintDialog dlg
= new PrintDialog();
78 // Show the printer dialog. If the return is "true",
79 // the user made a valid selection and clicked "Ok".
80 if (dlg
.ShowDialog() == true)
81 printDialog
= dlg
; // return the dialog the user selections.
84 }// end:GetPrintDialog()
87 // ------------------------- PrintSingleVisual ------------------------
89 /// Prints a single visual element.</summary>
91 /// The print queue to print to.</param>
92 /// <param name="async">
93 /// true to print asynchronously; false to print synchronously.</param>
94 public void PrintSingleVisual(PrintQueue pq
, bool async)
96 // Create a single visual element.
97 Canvas v
= _wpfContent
.CreateFirstVisual(true);
99 // Create a document writer to print to.
100 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
102 // Transform the visual to fit the printer.
103 Visual transformedVisual
= PerformTransform(v
, pq
);
105 // Print either asynchronously or synchronously.
107 PrintVisualAsync(xdwPrint
, transformedVisual
);
109 PrintVisual(xdwPrint
, transformedVisual
);
110 }// end:PrintSingleVisual()
113 // ----------------------- PrintMultipleVisuals -----------------------
115 /// Prints a collection of multiple visual elements.</summary>
116 /// <param name="pq">
117 /// The print queue to print to.</param>
118 /// <param name="async">
119 /// true to print asynchronously; false to print synchronously.</param>
120 public void PrintMultipleVisuals(PrintQueue pq
, bool async)
122 // Create a collection of visuals
123 List
<Visual
> vc
= new List
<Visual
>();
127 v
= _wpfContent
.CreateFirstVisual(true);
128 Visual transformedVisual
= PerformTransform(v
, pq
);
129 vc
.Add(transformedVisual
);
131 v
= _wpfContent
.CreateSecondVisual(true);
132 transformedVisual
= PerformTransform(v
, pq
);
133 vc
.Add(transformedVisual
);
135 v
= _wpfContent
.CreateThirdVisual(true);
136 transformedVisual
= PerformTransform(v
, pq
);
137 vc
.Add(transformedVisual
);
139 // Retrieve Print Ticket from PrintQueue and
140 // change the orientation to Landscape.
141 PrintTicket pt
= pq
.UserPrintTicket
;
142 pt
.PageOrientation
= PageOrientation
.Landscape
;
144 // Create an printing XPSDocumentWriter
145 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
147 // Print either asynchronously or synchronously.
149 PrintVisualsAsync(xdwPrint
, vc
);
151 // Print content using helper function
152 PrintVisuals(xdwPrint
, vc
);
153 }// end:PrintMultipleVisuals()
156 // ------------------ PrintSingleFlowContentDocument ------------------
158 /// Prints the content of a single flow document.</summary>
159 /// <param name="pq">
160 /// The print queue to print to.</param>
161 /// <param name="async">
162 /// true to print asynchronously; false to print synchronously.</param>
163 public void PrintSingleFlowContentDocument(PrintQueue pq
, bool async)
165 // Create a paginated flow document.
166 DocumentPaginator idp
=
167 _wpfContent
.CreateFlowDocument().DocumentPaginator
;
169 // Create a document writer to print to.
170 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
172 // Scale the paginated flow document to a visual for printing.
173 Visual visual
= _wpfContent
.AdjustFlowDocumentToPage(idp
, pq
);
175 // Print either asynchronously or synchronously.
177 PrintVisual(xdwPrint
, visual
);
179 PrintVisualAsync(xdwPrint
, visual
);
180 }// end:PrintSingleFlowContentDocument()
183 // ------------------ PrintSingleFixedContentDocument -----------------
185 /// Prints the content of a single fixed document.</summary>
186 /// <param name="pq">
187 /// The print queue to print to.</param>
188 /// <param name="async">
189 /// true to print asynchronously; false to print synchronously.</param>
190 public void PrintSingleFixedContentDocument(PrintQueue pq
, bool async)
192 // Create a FixedDocument with associated PrintTicket.
193 FixedDocument fd
= _wpfContent
.CreateFixedDocumentWithPages(pq
);
195 // Create a document writer to print to.
196 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
198 // Print either asynchronously or synchronously.
200 PrintSingleFixedContentDocumentAsync(xdwPrint
, fd
);
202 PrintSingleFixedContentDocument(xdwPrint
, fd
);
203 }// end:PrintSingleFixedContentDocument()
207 // ---------------- PrintMultipleFixedContentDocuments ----------------
209 /// Prints the content of a multiple fixed document sequence.</summary>
210 /// <param name="pq">
211 /// The print queue to print to.</param>
212 /// <param name="async">
213 /// true to print asynchronously; false to print synchronously.</param>
214 public void PrintMultipleFixedContentDocuments(PrintQueue pq
, bool async)
216 // Create a multiple document FixedDocumentSequence.
217 FixedDocumentSequence fds
=
218 _wpfContent
.LoadFixedDocumentSequenceFromDocument();
220 // Create a document writer to print to.
221 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
223 // Set the event handler for creating print tickets for
224 // each document within the fixed document sequence.
225 xdwPrint
.WritingPrintTicketRequired
+=
226 new WritingPrintTicketRequiredEventHandler(
227 MultipleFixedContentDocuments_WritingPrintTicketRequired
);
228 _firstDocumentPrintTicket
= 0;
230 // Print either asynchronously or synchronously.
232 PrintMultipleFixedContentDocumentsAsync(xdwPrint
, fds
);
234 PrintMultipleFixedContentDocuments(xdwPrint
, fds
);
235 }// end:PrintMultipleFixedContentDocuments()
239 // -------------------- PrintDocumentViewerContent --------------------
241 /// Prints the content displayed in a
242 /// given DocumentViewer control.</summary>
243 /// <param name="dv">
244 /// The DocumentViewer content to print.</param>
245 /// <param name="pq">
246 /// The print queue to print to.</param>
247 /// <param name="async">
248 /// true to print asynchronously; false to print synchronously.</param>
249 public void PrintDocumentViewerContent(
250 DocumentViewer dv
, PrintQueue pq
, bool async)
252 // Create a document writer for printing
253 XpsDocumentWriter xdwPrint
= GetPrintXpsDocumentWriter(pq
);
255 // Scale the DocumentViewer content for the printer.
256 DocumentPaginator idp
= dv
.Document
.DocumentPaginator
;
257 Visual visual
= _wpfContent
.AdjustFlowDocumentToPage(idp
, pq
);
259 // Print either asynchronously or synchronously.
261 PrintVisual(xdwPrint
, visual
);
263 PrintVisualAsync(xdwPrint
, visual
);
264 }// end:PrintDocumentViewerContent()
266 #endregion // Print Interface
269 #region Synchronous Print Methods
271 // ------------------------- PrintVisualAsync -------------------------
273 /// Synchronously prints a given visual
274 /// to a specified document writer.</summary>
275 /// <param name="xpsdw">
276 /// The document writer to output to.</param>
278 /// The visual to print.</param>
279 private void PrintVisual(XpsDocumentWriter xpsdw
, Visual v
)
281 xpsdw
.Write(v
); // Write visual to single page
285 // --------------------------- PrintVisuals ---------------------------
287 /// Synchronously prints of a given list of
288 /// visuals to a specified document writer.</summary>
289 /// <param name="xpsdw">
290 /// The document writer to output to.</param>
291 /// <param name="vc">
292 /// The list of visuals to print.</param>
293 private void PrintVisuals(XpsDocumentWriter xpsdw
, List
<Visual
> vc
)
295 // Setup for writing multiple visuals
296 VisualsToXpsDocument vToXpsD
=
297 (VisualsToXpsDocument
)xpsdw
.CreateVisualsCollator();
299 // Iterate through all visuals in the collection
300 foreach (Visual v
in vc
)
302 vToXpsD
.Write(v
); //Write each visual to single page
305 // End writing multiple visuals
306 vToXpsD
.EndBatchWrite();
310 // ------------------ PrintSingleFlowContentDocument ------------------
312 /// Synchronously prints a given paginated flow
313 /// document to a specified document writer.</summary>
314 /// <param name="xpsdw">
315 /// The document writer to output to.</param>
316 /// <param name="idp">
317 /// The paginated flow document to print.</param>
318 private void PrintSingleFlowContentDocument(
319 XpsDocumentWriter xpsdw
, DocumentPaginator idp
)
321 xpsdw
.Write(idp
); // Write the IDP as a document
324 // ----------------- PrintSingleFixedContentDocument ------------------
326 /// Synchronously prints of a given fixed
327 /// document to a specified document writer.</summary>
328 /// <param name="xpsdw">
329 /// The document writer to output to.</param>
330 /// <param name="fd">
331 /// The fixed document to print.</param>
332 private void PrintSingleFixedContentDocument(
333 XpsDocumentWriter xpsdw
, FixedDocument fd
)
335 xpsdw
.Write(fd
); // Write the FixedDocument as a document.
339 // ---------------- PrintMultipleFixedContentDocuments ----------------
341 /// Synchronously prints multiple fixed documents from a given
342 /// FixedDocumentSequence to a specified DocumentWriter.</summary>
343 /// <param name="xpsdw">
344 /// The document writer to output to.</param>
345 /// <param name="fds">
346 /// The fixed document sequence to print.</param>
347 private void PrintMultipleFixedContentDocuments(
348 XpsDocumentWriter xpsdw
, FixedDocumentSequence fds
)
350 xpsdw
.Write(fds
); // Write as a collection of documents.
353 #endregion // Synchronous Print Methods
356 #region Asynchronous Print Methods
358 // ------------------------- PrintVisualAsync -------------------------
360 /// Initiates asynchronous output of a given
361 /// visual to a specified document writer.</summary>
362 /// <param name="xpsdw">
363 /// The document writer to output to.</param>
365 /// The visual to print.</param>
366 private void PrintVisualAsync(XpsDocumentWriter xpsdw
, Visual v
)
368 _xpsdwActive
= xpsdw
; // Save the active document writer.
370 xpsdw
.WritingCompleted
+=
371 new WritingCompletedEventHandler(AsyncPrintCompleted
);
373 xpsdw
.WriteAsync(v
); // Write the visual to a single page.
377 // ------------------------- PrintVisualsAsync ------------------------
379 /// Initiates asynchronous output of a given list of
380 /// visuals to a specified document writer.</summary>
381 /// <param name="xpsdw">
382 /// The document writer to output to.</param>
383 /// <param name="vc">
384 /// The list of visuals to print.</param>
385 private void PrintVisualsAsync(XpsDocumentWriter xpsdw
, List
<Visual
> vc
)
387 _xpsdwActive
= xpsdw
; // Save the active document writer.
389 xpsdw
.WritingCompleted
+=
390 new WritingCompletedEventHandler(AsyncPrintCompleted
);
392 xpsdw
.WritingProgressChanged
+=
393 new WritingProgressChangedEventHandler(AsyncPrintingProgress
);
395 // Setup for writing multiple visuals
396 VisualsToXpsDocument vToXpsD
=
397 (VisualsToXpsDocument
)xpsdw
.CreateVisualsCollator();
400 _activeVtoXPSD
= vToXpsD
;
402 // Iterate through all visuals in the collection.
403 foreach (Visual v
in vc
)
405 vToXpsD
.WriteAsync(v
); //Write each visual to a single page.
407 }// end:PrintVisualsAsync()
410 // --------------- PrintSingleFlowContentDocumentAsync ----------------
412 /// Initiates asynchronous output of a given paginated
413 /// flow document to a specified document writer.</summary>
414 /// <param name="xpsdw">
415 /// The document writer to output to.</param>
416 /// <param name="idp">
417 /// The paginated flow document to print.</param>
418 private void PrintSingleFlowContentDocumentAsync(
419 XpsDocumentWriter xpsdw
, DocumentPaginator idp
)
421 _xpsdwActive
= xpsdw
; // Save the active document writer.
423 xpsdw
.WritingCompleted
+=
424 new WritingCompletedEventHandler(AsyncPrintCompleted
);
426 xpsdw
.WriteAsync(idp
); // Write the IDP as a document.
427 }// end:PrintSingleFlowContentDocumentAsync()
430 // --------------- PrintSingleFixedContentDocumentAsync ---------------
432 /// Initiates asynchronous print of a given fixed
433 /// document to a specified document writer.</summary>
434 /// <param name="xpsdw">
435 /// The document writer to output to.</param>
436 /// <param name="fd">
437 /// The fixed document to print.</param>
438 private void PrintSingleFixedContentDocumentAsync(
439 XpsDocumentWriter xpsdw
, FixedDocument fd
)
441 _xpsdwActive
= xpsdw
; // Save the active document writer.
443 xpsdw
.WritingCompleted
+=
444 new WritingCompletedEventHandler(AsyncPrintCompleted
);
446 xpsdw
.WriteAsync(fd
); // Print the FixedDocument.
450 // -------------- PrintMultipleFixedContentDocumentsAsync -------------
452 /// Initiates asynchronous print of multiple fixed documents from a
453 /// given FixedDocumentSequence to a specified DocumentWriter.</summary>
454 /// <param name="xpsdw">
455 /// The document writer to output to.</param>
456 /// <param name="fds">
457 /// The fixed document sequence to print.</param>
458 private void PrintMultipleFixedContentDocumentsAsync(
459 XpsDocumentWriter xpsdw
, FixedDocumentSequence fds
)
461 _xpsdwActive
= xpsdw
; // Save the active document writer.
463 xpsdw
.WritingCompleted
+=
464 new WritingCompletedEventHandler(AsyncPrintCompleted
);
466 xpsdw
.WritingProgressChanged
+=
467 new WritingProgressChangedEventHandler(AsyncPrintingProgress
);
469 // Write the FixedDocumentSequence as a
470 // collection of documents asynchronously.
471 xpsdw
.WriteAsync(fds
);
472 }// end:PrintMultipleFixedContentDocumentsAsync()
475 // ---------------------------- CancelAsync ---------------------------
477 /// Cancels the current asynchronous print opertion.</summary>
478 public void CancelAsync()
480 _xpsdwActive
.CancelAsync();
483 #endregion // Asynchronous Print Methods
486 #region Async Event Handlers
488 // ------------------------ AsyncPrintCompleted -----------------------
490 /// Creates an "async operation complete" event handler
491 /// for print completion of a FixedDocumentSequence.</summary>
492 private void AsyncPrintCompleted(
493 object sender
, WritingCompletedEventArgs e
)
495 string result
= null;
498 else if (e
.Error
!= null)
501 result
= "Asynchronous Print Completed";
503 if (OnAsyncPrintChange
!= null)
505 AsyncPrintEventArgs asyncInfo
=
506 new AsyncPrintEventArgs(result
, true);
507 OnAsyncPrintChange(this, asyncInfo
); // update display status
509 }// end:AsyncPrintCompleted()
512 // ----------------------- AsyncPrintingProgress ----------------------
514 /// Creates an "async operation progress" event handler for tracking
515 /// the progress in printing a FixedDocumentSequence.</summary>
516 private void AsyncPrintingProgress(
517 object sender
, WritingProgressChangedEventArgs e
)
521 if (OnAsyncPrintChange
!= null)
523 String progress
= String
.Format("{0} - {1}",
524 e
.WritingLevel
.ToString(), e
.Number
.ToString());
525 AsyncPrintEventArgs asyncInfo
=
526 new AsyncPrintEventArgs(progress
, false);
527 OnAsyncPrintChange(this, asyncInfo
); // update display status
530 // Will only called EndBatchWrite when serializing Multiple Visuals
531 if (_activeVtoXPSD
!= null && _batchProgress
== 3)
533 _activeVtoXPSD
.EndBatchWrite();
535 }// end:AsyncPrintingProgress()
538 // ----- MultipleFixedContentDocuments_WritingPrintTicketRequired -----
540 /// Creates a PrintTicket event handler for
541 /// printing a FixedDocumentSequence.</summary>
542 private void MultipleFixedContentDocuments_WritingPrintTicketRequired(
543 Object sender
, WritingPrintTicketRequiredEventArgs e
)
545 if (e
.CurrentPrintTicketLevel
==
546 PrintTicketLevel
.FixedDocumentSequencePrintTicket
)
548 // Create a PrintTicket for the FixedDocumentSequence. Any
549 // PrintTicket setting specified at the FixedDocumentSequence
550 // level will be inherited by lower level (i.e. FixedDocument or
551 // FixedPage) unless there exists lower level PrintTicket that
552 // sets the setting differently, in which case the lower level
553 // PrintTicket setting will override the higher level setting.
554 PrintTicket ptFDS
= new PrintTicket();
555 ptFDS
.PageOrientation
= PageOrientation
.Portrait
;
556 ptFDS
.Duplexing
= Duplexing
.TwoSidedLongEdge
;
557 e
.CurrentPrintTicket
= ptFDS
;
560 else if (e
.CurrentPrintTicketLevel
==
561 PrintTicketLevel
.FixedDocumentPrintTicket
)
563 // Use different PrintTickets for different FixedDocuments.
564 PrintTicket ptFD
= new PrintTicket();
566 if (_firstDocumentPrintTicket
<= 1)
567 { // Print the first document in black/white and in portrait
568 // orientation. Since the PrintTicket at the
569 // FixedDocumentSequence level already specifies portrait
570 // orientation, this FixedDocument can just inherit that
571 // setting without having to set it again.
572 ptFD
.PageOrientation
= PageOrientation
.Portrait
;
573 ptFD
.OutputColor
= OutputColor
.Monochrome
;
574 _firstDocumentPrintTicket
++;
577 else // if (_firstDocumentPrintTicket > 1)
578 { // Print the second document in color and in landscape
579 // orientation. Since the PrintTicket at the
580 // FixedDocumentSequence level already specifies portrait
581 // orientation, this FixedDocument needs to set its
582 // PrintTicket with landscape orientation in order to
583 // override the higher level setting.
584 ptFD
.PageOrientation
= PageOrientation
.Landscape
;
585 ptFD
.OutputColor
= OutputColor
.Color
;
588 e
.CurrentPrintTicket
= ptFD
;
589 }// end:else if (CurrentPrintTicketLevel==FixedDocumentPrintTicket)
591 // Even though we don't show code for specifying PrintTicket for
592 // the FixedPage level, the same inheritance-override logic applies
593 // to FixedPage as well.
595 }// end:MultipleFixedContentDocuments_WritingPrintTicketRequired()
598 // -------------- CreateFixedDocumentSequencePrintTicket --------------
600 /// Creates a FixedDocumentSequence compatible PrintTicket.</summary>
602 /// A FixedDocumentSequence compatible PrintTicket.</returns>
603 private PrintTicket
CreateFixedDocumentSequencePrintTicket()
605 // Create a local print server
606 LocalPrintServer ps
= new LocalPrintServer();
608 // Get the default print queue
609 PrintQueue pq
= ps
.DefaultPrintQueue
;
611 // Get the default user print ticket
612 PrintTicket pt
= pq
.UserPrintTicket
;
614 // Set Duplexing value for each document in the job
615 pt
.Duplexing
= Duplexing
.OneSided
;
618 }// end:CreateFixedDocumentSequencePrintTicket()
621 // ------------------ CreateFixedDocumentPrintTicket ------------------
623 /// Creates a FixedDocument compatible PrintTicket.</summary>
624 /// <param name="isLandscaped">
625 /// true to output in landscape; false to output in portrait.</param>
627 /// A FixedDocument compatible PrintTicket.</returns>
628 private PrintTicket
CreateFixedDocumentPrintTicket(bool isLandscaped
)
630 // Create a local print server
631 LocalPrintServer ps
= new LocalPrintServer();
633 // Get the default print queue
634 PrintQueue pq
= ps
.DefaultPrintQueue
;
636 // Get the default user print ticket
637 PrintTicket pt
= pq
.UserPrintTicket
;
639 // Set Duplexing value for the document
640 pt
.Duplexing
= Duplexing
.TwoSidedLongEdge
;
643 pt
.PageOrientation
= PageOrientation
.Landscape
;
646 }// end:CreateFixedDocumentPrintTicket()
648 #endregion // Async Event Handlers
651 #region Helper Methods
653 // -------------------- GetPrintXpsDocumentWriter() -------------------
655 /// Returns an XpsDocumentWriter for the default print queue.</summary>
657 /// An XpsDocumentWriter for the default print queue.</returns>
658 private XpsDocumentWriter
GetPrintXpsDocumentWriter()
660 // Create a local print server
661 LocalPrintServer ps
= new LocalPrintServer();
663 // Get the default print queue
664 PrintQueue pq
= ps
.DefaultPrintQueue
;
666 // Get an XpsDocumentWriter for the default print queue
667 XpsDocumentWriter xpsdw
= PrintQueue
.CreateXpsDocumentWriter(pq
);
669 }// end:GetPrintXpsDocumentWriter()
671 // --------------- GetPrintXpsDocumentWriter(PrintQueue) --------------
673 /// Returns an XpsDocumentWriter for a given print queue.</summary>
674 /// <param name="pq">
675 /// The print queue to return the XpsDocumentWriter for.</param>
677 /// An XpsDocumentWriter for the given print queue.</returns>
678 private XpsDocumentWriter
GetPrintXpsDocumentWriter(PrintQueue pq
)
680 XpsDocumentWriter xpsdw
= PrintQueue
.CreateXpsDocumentWriter(pq
);
682 }// end:GetPrintXpsDocumentWriter(PrintQueue)
685 // -------------------- GetPrintXpsDocumentWriter() -------------------
687 /// Returns a scaled copy of a given visual transformed to
688 /// fit for printing to a specified print queue.</summary>
690 /// The visual to be printed.</param>
691 /// <param name="pq">
692 /// The print queue to be output to.</param>
694 /// The root element of the transformed visual.</returns>
695 private Visual
PerformTransform(Visual v
, PrintQueue pq
)
697 ContainerVisual root
= new ContainerVisual();
698 const double inch
= 96;
701 double xMargin
= 1.25 * inch
;
702 double yMargin
= 1 * inch
;
704 PrintTicket pt
= pq
.UserPrintTicket
;
705 Double printableWidth
= pt
.PageMediaSize
.Width
.Value
;
706 Double printableHeight
= pt
.PageMediaSize
.Height
.Value
;
708 Double xScale
= (printableWidth
- xMargin
* 2) / printableWidth
;
709 Double yScale
= (printableHeight
- yMargin
* 2) / printableHeight
;
711 root
.Children
.Add(v
);
712 root
.Transform
= new MatrixTransform(xScale
, 0, 0, yScale
, xMargin
, yMargin
);
715 }// end:PerformTransform()
718 #endregion // Helper Methods
722 private int _batchProgress
= 0;
723 private int _firstDocumentPrintTicket
= 0;
724 private String _contentDir
= null;
725 private WPFContent _wpfContent
= null;
726 private VisualsToXpsDocument _activeVtoXPSD
= null;
727 private XpsDocumentWriter _xpsdwActive
= null;
728 #endregion // Private Data
730 }// end:class XpsPrintHelper
732 }// end:namespace SDKSampleHelper