C# Class Aspose.Plugins.AsposeVSOpenXML.XpsPrintHelper

A utility class that converts a document to XPS using Aspose.Words and then sends to the XpsPrint API.
Exibir arquivo Open project: aspose-words/Aspose.Words-for-.NET Class Usage Examples

Public Methods

Method Description
Print ( Aspose document, string printerName, string jobName, bool isWait ) : void

Sends an Aspose.Words document to a printer using the XpsPrint API.

Print ( Stream stream, string printerName, string jobName, bool isWait ) : void

Sends a stream that contains a document in the XPS format to a printer using the XpsPrint API. Has no dependency on Aspose.Words, can be used in any project.

Private Methods

Method Description
CheckJobStatus ( IXpsPrintJob job ) : void
CloseHandle ( IntPtr hObject ) : bool
CopyJob ( Stream stream, IXpsPrintJob job, IXpsPrintJobStream jobStream ) : void
CreateEvent ( IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName ) : IntPtr
StartJob ( string printerName, string jobName, IntPtr completionEvent, IXpsPrintJob &job, IXpsPrintJobStream &jobStream ) : void
StartXpsPrintJob ( [ printerName, [ jobName, [ outputFileName, IntPtr progressEvent, IntPtr completionEvent, [ printablePagesOn, UInt32 printablePagesOnCount, IXpsPrintJob &xpsPrintJob, IXpsPrintJobStream &documentStream, IntPtr printTicketStream ) : int
WaitForJob ( IntPtr completionEvent ) : void
WaitForSingleObject ( IntPtr handle, Int32 milliseconds ) : WAIT_RESULT
XpsPrintHelper ( ) : System

No ctor.

Method Details

Print() public static method

Sends an Aspose.Words document to a printer using the XpsPrint API.
Thrown if any error occurs.
public static Print ( Aspose document, string printerName, string jobName, bool isWait ) : void
document Aspose
printerName string
jobName string Job name. Can be null.
isWait bool True to wait for the job to complete. False to return immediately after submitting the job.
return void

Print() public static method

Sends a stream that contains a document in the XPS format to a printer using the XpsPrint API. Has no dependency on Aspose.Words, can be used in any project.
Thrown if any error occurs.
public static Print ( Stream stream, string printerName, string jobName, bool isWait ) : void
stream Stream
printerName string
jobName string Job name. Can be null.
isWait bool True to wait for the job to complete. False to return immediately after submitting the job.
return void