Class dymo.label.framework.ILabel
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
There is no constructor function for ILabel.
|
| Method Attributes | Method Name and Description |
|---|---|
|
getAddressBarcodePosition(addressIndex)
Gets the Intelligent Mail barcode position for an Address object.
|
|
|
Gets the number of Address objects on the label.
|
|
|
getAddressText(addressIndex)
Gets the text content of an Address object.
|
|
|
Returns the current label as an XML string.
|
|
|
Gets an array of object reference names on the label.
|
|
|
getObjectText(objectName)
Gets the 'text' content of an object.
|
|
|
print(printerName, printParamsXml, labelSetXml)
Prints the label.
|
|
|
render(renderParamsXml, printerName)
Creates a label raster image that can be used for label previewing.
|
|
|
setAddressBarcodePosition(addressIndex, bacodePosition)
Sets the Intelligent Mail barcode position for an Address object.
|
|
|
setAddressText(addressIndex, text)
Sets the text content of an Address object.
|
|
|
setObjectText(objectName, text)
Sets the text content for an object.
|
Class Detail
dymo.label.framework.ILabel()
There is no constructor function for ILabel. To get ILabel instance use the dymo.label.framework.openLabelFile or dymo.label.framework.openLabelXml function. ILabel provides methods for manipulating label content,
such as set address or text on the label.
Method Detail
{dymo.label.framework.AddressBarcodePosition}
getAddressBarcodePosition(addressIndex)
Gets the Intelligent Mail barcode position for an Address object.
Returns a string with one of the values defined by the dymo.label.framework.AddressBarcodePosition enumeration.
- Parameters:
- {number} addressIndex
- The zero-based index of the Address object in a 'virtual' array of all Address objects on the label.
- Returns:
- {dymo.label.framework.AddressBarcodePosition}
{number}
getAddressObjectCount()
Gets the number of Address objects on the label.
- Returns:
- {number}
{string}
getAddressText(addressIndex)
Gets the text content of an Address object.
- Parameters:
- {number} addressIndex
- The zero-based index of the Address object in a 'virtual' array of all Address objects on the label.
- Returns:
- {string} The plain text from the Address object.
{string}
getLabelXml()
Returns the current label as an XML string.
The returned XML string can be passed to functions that accept label XML as a parameter,
or can be used to direct content manipulations not currently supported by the Framework.
- Returns:
- {string}
{Array}
getObjectNames()
Gets an array of object reference names on the label.
Returns an array of strings.
- Returns:
- {Array}
{string}
getObjectText(objectName)
Gets the 'text' content of an object.
The content depends on the object type.
- Address and Text objects - Returns the object text without formatting.
- Barcode object - Returns the barcode string.
- Image - Returns the base64-encoded string on the image's PNG stream (only if image data is embedded with the label and not linked to a URL or file).
- Circular Text object - Returns the object text.
- Other objects - Returns an empty string.
- Parameters:
- {string} objectName
- The name of the object.
- Returns:
- {string}
print(printerName, printParamsXml, labelSetXml)
Prints the label.
- Parameters:
- {string} printerName
- The name of the printer to print to. A list of printers can be obtained using dymo.label.framework.getPrinters.
- {string} printParamsXml
- The print parameters, such as number of copies, print quality, etc. See PrintParams.xsd.
- {string} labelSetXml
- The LabelSet to print. LabelSet is used to print multiple labels with the same layout, but with different data, such as multiple addresses. Use the dymo.label.framework.LabelSetBuilder class to create a LabelSet or construct XML manualy according to LabelSet.xsd.
{string}
render(renderParamsXml, printerName)
Creates a label raster image that can be used for label previewing.
- Parameters:
- {string} renderParamsXml
- Rendering parameters, such as shadow depth, label color, etc. See LabelRenderParams.xsd.
- {string} printerName
- The name of the printer that the preview is generated for. The preview/output can be different for different printers,
especially for tape printers with different print head sizes.
If it is not important what printer the label is printed to, an empty string can be passed. In this case, the default printer metrics will be used. The default is LW400 for LabelWriter printers and LW400 DUO Tape for tape printers.
- Returns:
- {string}
{dymo.label.framework.ILabel}
setAddressBarcodePosition(addressIndex, bacodePosition)
Sets the Intelligent Mail barcode position for an Address object.
- Parameters:
- {number} addressIndex
- The zero-based index of the Address object in a 'virtual' array of all Address objects on the label.
- {dymo.label.framework.AddressBarcodePosition} bacodePosition
- The barcode position.
- Returns:
- {dymo.label.framework.ILabel} self
{dymo.label.framework.ILabel}
setAddressText(addressIndex, text)
Sets the text content of an Address object.
- Parameters:
- {number} addressIndex
- The zero-based index of the Address object in a 'virtual' array of all Address objects on the label.
- {string} text
- The plain text string that contains the content of the Address object. Note: The current text formatting is retained on a line-by-line basis.
- Returns:
- {dymo.label.framework.ILabel} self
{dymo.label.framework.ILabel}
setObjectText(objectName, text)
Sets the text content for an object.
The content and/or text formatting are set differently depending on the object type.
- Address object - The formatting is applied on a line-by-line basis (using
list). - Text object - The formatting of the current first character is applied to all text.
- Barcode object - The barcode text.
- Image object - The base64-encoded string of image's PNG stream.
- CircularText object - The object text.
- Date and Time and Counter objects - The object's 'Before' text.
- Other objects - An empty string.
- Parameters:
- {string} objectName
- The name of the object.
- {string} text
- The plain text string for new object content.
- Returns:
- {dymo.label.framework.ILabel} self