Profile Class |
The Profile type exposes the following members.
Name | Description | |
---|---|---|
![]() | AddFirmware(String) | Adds a firmware file to an existing printer profile. |
![]() | AddFirmware(String, Byte) | Adds a firmware file to an existing printer profile. |
![]() | AddSupplement | Adds data to supplement an existing printer profile. |
![]() | ConfigureAlert | Configures an alert to be triggered when the alert's condition occurs or becomes resolved. |
![]() | ConfigureAlerts | Configures a list of alerts to be triggered when their conditions occur or become resolved. |
![]() | DeleteFile | Deletes the file from the profile. The filePath may also contain wildcards. |
![]() | DownloadTteFont(Stream, String) | Adds a TrueType® font to a profile and stores it at the specified path as a TrueType® extension (TTE). |
![]() | DownloadTteFont(String, String) | Adds a TrueType® font file to a profile and stores it at the specified path as a TrueType® extension (TTE). |
![]() | DownloadTtfFont(Stream, String) | Adds a TrueType® font file to a profile and stores it at the specified path as a TTF. |
![]() | DownloadTtfFont(String, String) | Adds a TrueType® font file to a profile and stores it at the specified path as a TTF. |
![]() | Equals | (Inherited from Object) |
![]() | GetAllSettings | Retrieve all settings and their attributes. |
![]() | GetAllSettingValues | Retrieves all of the profile's setting values. |
![]() | GetArchivableSettingValues | Retrieve the values of all the settings that are archivable. |
![]() | GetAvailableSettings | Retrieve all of the setting identifiers for a profile. |
![]() | GetClonableSettingValues | Retrieve the values of all the settings that are clonable. |
![]() | GetConfiguredAlerts | A list of objects detailing the alert configurations in a profile. |
![]() | GetFirmwareFilename | Returns the file name of the firmware file within the profile. |
![]() | GetHashCode | (Inherited from Object) |
![]() | GetObjectFromPrinter(String) | Retrieves a file from the profile and returns the contents of that file as a byte array. |
![]() | GetObjectFromPrinter(Stream, String) | Retrieves a file from the printer's file system and writes the contents of that file to destinationStream. |
![]() | GetObjectFromPrinterViaFtp(String, String) | This method is not valid for a profile. |
![]() | GetObjectFromPrinterViaFtp(Stream, String, String) | This method is not valid for a profile. |
![]() | GetPrinterDownloadableObjectFromPrinter | Retrieves a file from the profile and returns the contents of that file as a byte array including all necessary file wrappers for re-downloading to a Zebra printer. |
![]() | GetSetting | Retrieves the profile's Setting for a setting id. |
![]() | GetSettingRange | Retrieves the allowable range for a setting. |
![]() | GetSettingsValues | Retrieves the profile's setting values for a list of setting ids. |
![]() | GetSettingType | Returns the data type of the setting. |
![]() | GetSettingValue | Retrieves the profile's setting value for a setting id. |
![]() | GetStorageInfo | This method is not valid for a profile. |
![]() | GetSupplement | Returns the supplement data within the profile. |
![]() | GetType | (Inherited from Object) |
![]() | IsSettingReadOnly | Returns true if the setting is read only. |
![]() | IsSettingValid | Returns true if value is valid for the given setting. |
![]() | IsSettingWriteOnly | Returns true if the setting is write only. |
![]() | PrintImage(String, Int32, Int32) | Prints an image from the connecting device file system to the connected device as a monochrome image. |
![]() | PrintImage(String, Int32, Int32, Int32, Int32, Boolean) | Prints an image from the connecting device file system to the connected device as a monochrome image. |
![]() | PrintImage(ZebraImageI, Int32, Int32, Int32, Int32, Boolean) | Prints an image to the connected device as a monochrome image. |
![]() | ProcessSettingsViaMap | Change or retrieve settings in the profile. |
![]() | RemoveAlert | Removes a configured alert from a profile. |
![]() | RemoveAllAlerts | Removes all alerts currently in a profile. |
![]() | RemoveFirmware | Removes the firmware file from the profile. |
![]() | RetrieveFileNames | Retrieves the names of the files which are in the profile. |
![]() | RetrieveFileNames(String) | Retrieves the names of the files which are stored on the device. |
![]() | RetrieveObjectsProperties | Retrieves the properties of the objects which are stored on the device. |
![]() | SendContents | Adds a file to the profile named fileNameOnPrinter with the file contents from fileContents. |
![]() | SendFileContents(String) | This method is not valid for a profile. |
![]() | SendFileContents(String, ProgressMonitor) | This method is not valid for a profile. |
![]() | SetAllSettings | Change settings in the profile. |
![]() | SetSetting(String, String) | Change the value of the setting in the profile to the given value. |
![]() | SetSetting(String, Setting) | Change the setting in the profile. |
![]() | SetSettings | Set more than one setting. |
![]() | StoreFileOnPrinter(String) | Stores the file in the profile using any required file wrappers. |
![]() | StoreFileOnPrinter(Byte, String) | Stores a file in the profile named fileNameOnPrinter with the file contents from fileContents using any required file wrappers. |
![]() | StoreFileOnPrinter(String, String) | Stores the file in the profile at the specified location and name using any required file wrappers. |
![]() | StoreImage(String, String, Int32, Int32) | Stores the specified image to the connected printer as a monochrome image. |
![]() | StoreImage(String, ZebraImageI, Int32, Int32) | Stores the specified image to the connected printer as a monochrome image. |
![]() | ToString | (Inherited from Object) |
using System; using System.IO; using Zebra.Sdk.Comm; using Zebra.Sdk.Device; using Zebra.Sdk.Printer; using Zebra.Sdk.Settings; public class ProfileExample { public static void Main(string[] args) { string pathToProfile = "C:\\MyNewProfile.zprofile"; string printerToClone = "1.2.3.4"; string targetPrinter = "192.168.1.33"; string darknessSettingId = "print.tone"; string newDarknessValue = "10.0"; TcpConnection connection = new TcpConnection(printerToClone, TcpConnection.DEFAULT_ZPL_TCP_PORT); TcpConnection targetPrinterConnection = new TcpConnection(targetPrinter, TcpConnection.DEFAULT_ZPL_TCP_PORT); try { connection.Open(); ZebraPrinter genericPrinter = ZebraPrinterFactory.GetInstance(connection); ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.CreateLinkOsPrinter(genericPrinter); if (linkOsPrinter != null) { Console.WriteLine("Start profile operation"); // Create a profile containing the settings from printerToClone. linkOsPrinter.CreateProfile(pathToProfile); Console.WriteLine("Done"); } connection.Close(); // Change the darkness in the profile. Profile profileForCloning = new Profile(pathToProfile); if (profileForCloning.GetAvailableSettings().Contains(darknessSettingId) && profileForCloning.IsSettingValid(darknessSettingId, newDarknessValue) && profileForCloning.IsSettingReadOnly(darknessSettingId) == false) { profileForCloning.SetSetting(darknessSettingId, newDarknessValue); } targetPrinterConnection.Open(); ZebraPrinter genericTargetPrinter = ZebraPrinterFactory.GetInstance(targetPrinterConnection); ZebraPrinterLinkOs linkOsTargetPrinter = ZebraPrinterFactory.CreateLinkOsPrinter(genericTargetPrinter); if (linkOsTargetPrinter != null) { Console.WriteLine("Start cloning operation"); // Clone the profile to targetPrinter linkOsTargetPrinter.LoadProfile(pathToProfile); Console.WriteLine("Done"); } } catch (ConnectionException e) { Console.WriteLine("Could not use connection"); Console.WriteLine(e.ToString()); } catch (ZebraPrinterLanguageUnknownException e) { Console.WriteLine("Could not recognize Zebra printer"); Console.WriteLine(e.ToString()); } catch (ZebraIllegalArgumentException e) { Console.WriteLine("Unexpected response from Zebra printer"); Console.WriteLine(e.ToString()); } catch (IOException e) { Console.WriteLine("Could not write to " + pathToProfile); Console.WriteLine(e.ToString()); } catch (SettingsException e) { Console.WriteLine("Could not access " + darknessSettingId); Console.WriteLine(e.ToString()); } finally { connection.Close(); targetPrinterConnection.Close(); } } }