Url Property

Summary
Gets or sets the url to be displayed in the message box that appears when the user tries to print directly to a locked printer.
Syntax
C#
C++/CLI
public string Url { get; set; } 
public: 
property String^ Url { 
   String^ get(); 
   void set (    String^ ); 
} 

Property Value

The url to be displayed in the message box.

Remarks

The value of this property is not used in the installation and uninstallation.

The url length should be less than 48 characters in normal font and style, and before the final deployment of an application, verify that the used url fits within the message box. If no url is provided, the LEADTOOLS printer url will be used (https://www.leadtools.com).

Example
C#
using Leadtools.Printer; 
using Leadtools; 
 
 
public void InstallNewPrinter() 
{ 
   try 
   { 
 
      string printerName = "Test LEADTOOLS Printer3"; 
      string printerPassword = "Test Password"; 
      if (Printer.IsLeadtoolsPrinter(printerName)) 
      { 
         PrinterInfo tmpPrinterInfo = new PrinterInfo(); 
         tmpPrinterInfo.PrinterName = printerName; 
         Printer.UnInstall(tmpPrinterInfo); 
      } 
 
      string documentPrinterRegPath = "SOFTWARE\\LEAD Technologies, Inc.\\22\\Printer\\"; 
      PrinterInfo printerInfo = new PrinterInfo(); 
      printerInfo.MonitorName = printerName; 
      printerInfo.PortName = printerName; 
      printerInfo.ProductName = printerName; 
      printerInfo.PrinterName = printerName; 
      printerInfo.Password = printerPassword; 
      printerInfo.RegistryKey = documentPrinterRegPath + printerName; 
      printerInfo.RootDir = @"C:\LEADTOOLS22\Bin\Common\PrinterDriver"; 
      printerInfo.Url = "https://www.leadtools.com"; 
      printerInfo.PrinterExe = @"C:\LEADTOOLS22\Bin\DotNet4\Win32\"; 
      printerInfo.AboutString = "LEADTOOLS Printer"; 
      //printerInfo.AboutIcon = Path.Combine(LEAD_VARS.ImagesDir, @"\RasterPro.ico"); 
 
      Printer.Install(printerInfo); 
 
      string strMsg = string.Format("Installation {0} Completed Successfully", printerName); 
      MessageBox.Show(strMsg, "LEADTOOLS Printer Demo", MessageBoxButtons.OK, MessageBoxIcon.Information); 
   } 
   catch (PrinterDriverException ex) 
   { 
      MessageBox.Show(string.Format("Other error: Message:{0}", ex.Message)); 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.Printer Assembly

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