Provides a callback function called from the Network Virtual Printer Driver when a print job starts up.
public bool Startup(
string virtualPrinterName,
byte[] initialData
)
virtualPrinterName
A System.String that represents the printer name.
initialData
Initialization data set by the server machine.
returning false from this function will cause the cancellation of the print job.
This Callback function will be called by the Network Virtual Printer Driver with the printer name and the initialization data set by Leadtools.Printer.Printer.SetNetworkInitialData.
using Leadtools.Printer.Client;
// This is how the Client Demo DLL should be implemented.
class LEADTOOLSNetworkClient : IVirtualPrinterClient
{
#region IVirtualPrinterClient Members
//Implement PrinterJob to be called when printer start printing job
bool IVirtualPrinterClient.PrintJob(PrintJobData printJobData)
{
string strMessage;
strMessage = "job printer from machine" + printJobData.ClientMachineName;
Console.WriteLine(strMessage);
//return true to continue job, false to cancel
return true;
}
//Implement PrinterJob to be called when printer ends printing job
void IVirtualPrinterClient.Shutdown(string virtualPrinterName)
{
string strMessage;
strMessage = "Printer " + virtualPrinterName + " Shut down";
Console.WriteLine(strMessage);
}
//Implement PrinterJob to be called when printer job starts up
bool IVirtualPrinterClient.Startup(string virtualPrinterName, byte[] initialData)
{
string strMessage;
strMessage = "Printer " + virtualPrinterName + " Start Up";
Console.WriteLine(strMessage);
//return true to continue job, false to cancel
return true;
}
#endregion
}