public sealed class ZplResourceStore
Printer memory emulation: downloaded graphics (~DG, ~DY), stored formats (^DF) and fonts. Object names are case-insensitive; the drive letter (R:, E:, B:) is ignored.
Constructors
| Signature | Description |
# ZplResourceStore() | |
Properties
| Property | Type | Description |
CacheGraphics { get; set; } | bool | Cache decoded ^GF graphic data, so labels repeating the same graphic (logos in every format of a job) decode it only once (default off; bounded to ZplResourceStore.MaxCachedGraphics entries). Turning it off clears the cache. |
CachedGraphicCount { get; } | int | Number of decoded graphics currently cached. |
Fonts { get; } | FontManager | |
Formats { get; } | IReadOnlyCollection<string> | |
Graphics { get; } | IReadOnlyCollection<string> | |
MaxCachedGraphics { get; set; } | int | Maximum number of decoded graphics kept while ZplResourceStore.CacheGraphics is on (default 64). |
MaxTotalBytes { get; set; } | long | Quota for objects downloaded by ZPL commands (~DG, ~DY, ~DU, ^DF), in bytes (default 256 MB, 0 = unlimited). Downloads that would exceed it are ignored, like a printer with full memory. |
UsedBytes { get; } | long | Approximate memory used by stored graphics, formats and downloaded fonts in bytes. |
Methods
| Method Signature | Returns | Description |
# AddFormat(string name, IEnumerable<ZplCommand> commands) | void | |
# AddGraphic(string name, MonoBitmap graphic) | void | |
# AddGraphic(string name, SKBitmap image, bool dither = false) | void | |
# Clear() | void | Clears all downloaded objects (like a printer power cycle). |
# GetFormat(string name) | List<ZplCommand> | |
# GetGraphic(string name) | MonoBitmap | |
# RemoveFormat(string name) | bool | |
# RemoveGraphic(string name) | bool | |
# RenameFont(string name, string newName) | bool | Renames a downloaded/registered font (false when it doesn't exist or the new name is taken). |
# RenameFormat(string name, string newName) | bool | Renames a stored format (false when it doesn't exist or the new name is taken). |
# RenameGraphic(string name, string newName) | bool | Renames a stored graphic (false when it doesn't exist or the new name is taken). |