A class representing a label for TSPL. More...
Public Member Functions | |
__init__ (self, str name) | |
Initializes a new instance of the Label class with the specified name. | |
str | name (self) |
Gets the name of the label. | |
name (self, str name) | |
Sets the name of the label. | |
add_object (self, Union[object, str] add_object) | |
Adds an object that can be converted to printer language syntax to the label. | |
add_raw_content (self, str raw_content) | |
Adds raw content to the label for cases where custom content needs to be added. | |
str | __str__ (self) |
Returns a string that can be sent to the printer. | |
Public Attributes | |
form | |
scale | |
Additional Inherited Members | |
![]() |
A class representing a label for TSPL.
This class implements the ILabel protocol and provides functionality for initializing, adding objects and raw content, and describing labels in TSPL.
LabelMaker.TSPL.Label.Label.__init__ | ( | self, | |
str | name ) |
Initializes a new instance of the Label class with the specified name.
name | The name of the label. |
str LabelMaker.TSPL.Label.Label.__str__ | ( | self | ) |
Returns a string that can be sent to the printer.
This method generates a string representation of the Label instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing in TSPL.
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.TSPL.Label.Label.add_object | ( | self, | |
Union[object, str] | add_object ) |
Adds an object that can be converted to printer language syntax to the label.
add_object | The object to be added to the label. |
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.TSPL.Label.Label.add_raw_content | ( | self, | |
str | raw_content ) |
Adds raw content to the label for cases where custom content needs to be added.
Adding raw content allows the addition of printer language commands or other features that may not be available. No formatting of the content is done; the caller is responsible for making sure the content follows printer language syntax.
raw_content | The raw content to be added to the label. |
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
str LabelMaker.TSPL.Label.Label.name | ( | self | ) |
Gets the name of the label.
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.TSPL.Label.Label.name | ( | self, | |
str | name ) |
Sets the name of the label.
name | The new name of the label. |
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.TSPL.Label.Label.form |
LabelMaker.TSPL.Label.Label.scale |