Represents a label that can be formatted for printing. 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 | |
![]() |
Represents a label that can be formatted for printing.
This class provides functionality for creating and managing a label with specified settings, allowing the addition of objects and raw content to be formatted for printer language syntax.
LabelMaker.PGL.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.PGL.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.
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.PGL.Label.Label.add_object | ( | self, | |
Union[object, str] | add_object ) |
Adds an object that can be converted to printer language syntax to the label.
This method allows for adding any object that can be formatted into the label's printer language.
add_object | The object to be added to the label. |
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.PGL.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.PGL.Label.Label.name | ( | self | ) |
Gets the name of the label.
Reimplemented from LabelMaker.Interfaces.ILabel.ILabel.
LabelMaker.PGL.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.PGL.Label.Label.form |
LabelMaker.PGL.Label.Label.scale |