IVirtualPrinterClient Interface

Summary
Provides an interface that defines callback functions called by the network print driver.
Syntax
C#
C++/CLI
public interface IVirtualPrinterClient 
public interface class IVirtualPrinterClient  
Remarks

The demo dll that implements this interface must connect to a specific printer using Leadtools.Printer.Client.Installer.PrinterInstaller class.

The Network Virtual Printer will execute the interface functions, passing useful information to the demo DLL.

Example
C#
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 
} 
Requirements

Target Platforms

Help Version 22.0.2023.1.25
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.