PrintJob
Represents a job that can be sent to a printer.
public class PrintJob : IDisposable
Public Class PrintJob
Implements IDisposable
Inheritance: ObjectPrintJob
Implements: IDisposable
Licensing Info
This class is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Examples
The following examples creates a print job and prints the job.Imports System
Imports ceTe.DynamicPDF.Printing
Module MyModule
Sub Main()
' Create a print job containing the first four pages of the PDF
Dim MyPrintJob As PrintJob = New PrintJob("PrinterName", "C:\MyDocument.pdf", 1, 4)
' Print the job
MyPrintJob.Print()
End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;
class MyClass
{
static void Main()
{
// Create a print job containing the first four pages of the PDF
PrintJob printJob = new PrintJob("PrinterName", @"C:\MyDocument.pdf", 1, 4);
// Print the job
printJob.Print();
}
}
Remarks
Events in this class may not fire if specified printer or network does not support communicating back.
Constructors
PrintJob(Printer) | Initializes a new instance of the PrintJob class. |
PrintJob(Printer, InputPdf) | Initializes a new instance of the PrintJob class. |
PrintJob(Printer, InputPdf, Int32, Int32) | Initializes a new instance of the PrintJob class. |
PrintJob(Printer, String) | Initializes a new instance of the PrintJob class. |
PrintJob(Printer, String, Int32, Int32) | Initializes a new instance of the PrintJob class. |
PrintJob(String) | Initializes a new instance of the PrintJob class. |
PrintJob(String, InputPdf) | Initializes a new instance of the PrintJob class. |
PrintJob(String, InputPdf, Int32, Int32) | Initializes a new instance of the PrintJob class. |
PrintJob(String, String) | Initializes a new instance of the PrintJob class. |
PrintJob(String, String, Int32, Int32) | Initializes a new instance of the PrintJob class. |
Properties
DocumentName | Gets or sets the name of the document that is to be shown in the print spooler. |
JobId | Gets the ID of the job. |
Pages | Gets a PrintJobPageList object that represents the pages to be printed by the job. |
PagesPrinted | Gets a value indicating how many pages have been printed. |
Printer | Gets the Printer object that is targeted by the job. |
PrintOptions | Gets a PrintJobPrintOptions objects that represents the printing options for the job. |
PrintPriority | Gets or sets the Print priority of print job. Enter the value in between the Range(1 - 99). |
PrintToFileName | Gets or sets the filename or path where the output will be saved. |
RawStatus | RawStatus represents the status as returned by the printer driver. It may have multiple bits set at the same time which means it can represent multiple values from the PrintJobStatus enumeration. |
Status | Gets the current status of the job. |
Methods
AddLicense(String) | Adds a license key. |
Dispose() | Clean up any resources being used. |
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
Print() | Prints the job to the printer. |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |
Events
PrintJob.Failed | Occurs when a job fails. |
PrintJob.Starting | Occurs before starting a job. |
PrintJob.Succeeded | Occurs when a job succeeds. |
PrintJob.Updated | Occurs when a job's status or pages printed is updated. |