Class Index

Classes


Namespace dymo.label.framework

Top namespace for DYMO Label Framework JavaScript library.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
dymo.label.framework.AddressBarcodePosition
Enumeration that specifies where to draw the Intellegent Mail barcode for an Address object.
<static>  
dymo.label.framework.FlowDirection
Emuneration that specifies the direction in which objects and object text are laid out on the label.
<static>  
dymo.label.framework.LabelWriterPrintQuality
Enumeration that specifies the print quality when printing to a LabelWriter printer.
<static>  
dymo.label.framework.TapeAlignment
Enumeration that specifies the leader and trailer for a tape label when printing to a Tape printer.
<static>  
dymo.label.framework.TapeCutMode
Enumeration that specifies the tape cut mode when printing multiple labels to a Tape printer.
<static>  
dymo.label.framework.TwinTurboRoll
Enumeration that specifies which roll to print to when printing to a Twin Turbo printer.
<static>  
dymo.label.framework.VERSION
Returns the library version number.
Method Summary
Method Attributes Method Name and Description
<static>  
dymo.label.framework.checkEnvironment()
Checks that the browser enviroment is suitable for the Framework.
<static>  
dymo.label.framework.createLabelRenderParamsXml(params)
Creates an XML string suitable to pass to the dymo.label.framework.renderLabel function as renderParamsXml parameter.
<static>  
dymo.label.framework.createLabelWriterPrintParamsXml(params)
Creates an XML string suitable to to pass to the dymo.label.framework.printLabel function as printParamsXml parameter.
<static>  
dymo.label.framework.createTapePrintParamsXml(params)
Creates an XML string suitable to pass to the dymo.label.framework.printLabel function as printParamsXml parameter.
<static>  
dymo.label.framework.getPrinters()
Gets a list of all printers supported by the DYMO Label Framework.
<static>  
dymo.label.framework.loadImageAsPngBase64(imageUri)
Loads an image from a URL or file and returns it as a base64-encoded PNG stream.
<static>  
dymo.label.framework.openLabelFile(fileName)
Loads label content from a file or URL.
<static>  
dymo.label.framework.openLabelXml(labelXml)
Loads label content from an XML stream/string.
<static>  
dymo.label.framework.printLabel(printerName, printParamsXml, labelXml, labelSetXml)
Prints one or more labels.
<static>  
dymo.label.framework.renderLabel(labelXml, renderParamsXml, printerName)
Creates a label raster image that can be used for label previewing.
Namespace Detail
dymo.label.framework
Field Detail
<static> dymo.label.framework.AddressBarcodePosition
Enumeration that specifies where to draw the Intellegent Mail barcode for an Address object.
Members:
AboveAddress - Indicates to print the barcode above the address.
BelowAddress - Indicates to print the barcode below the address.
Suppress - Indicates to not print the barcode at all.

<static> dymo.label.framework.FlowDirection
Emuneration that specifies the direction in which objects and object text are laid out on the label. For Middle East labels/content specify "RightToLeft", otherwise specify "LeftToRight" (default).
Members:
LeftToRight - Indicates that the content flows from left to right.
RightToLeft - Indicates that the content flows from right to left.

<static> dymo.label.framework.LabelWriterPrintQuality
Enumeration that specifies the print quality when printing to a LabelWriter printer.
Members:
Text - Indicates that text print quality (fast) is used.
BarcodeAndGraphics - Indicates that barcode and images print quality (slow) is used.
Auto - Indicates that the print quality is automatically determined based on the types of objects on the label.

<static> dymo.label.framework.TapeAlignment
Enumeration that specifies the leader and trailer for a tape label when printing to a Tape printer.
Members:
Center - Indicates a 10mm leader and a 10mm trailer.
Left - Indicates a 6mm leader and a 10mm trailer.
Right - Indicates a 10mm leader and a 6mm trailer.

<static> dymo.label.framework.TapeCutMode
Enumeration that specifies the tape cut mode when printing multiple labels to a Tape printer. Note: This enumeration affects multiple page print jobs only. If a one page job is printed, the tape is always cut.
Members:
AutoCut - Indicates to cut the tape between labels.
ChainMarks - Indicates to print cut marks between labels.

<static> dymo.label.framework.TwinTurboRoll
Enumeration that specifies which roll to print to when printing to a Twin Turbo printer.
Members:
Left - Indicates to print to the left roll only.
Right - Indicates to print to the right roll only.
Auto - Indicates to continue printing to the other roll when the current roll is out of paper. Note: This does not indicate which roll to print to first; printing may start on either roll.

<static> dymo.label.framework.VERSION
Returns the library version number. The current version is "1.0" .
Method Detail
<static> dymo.label.framework.checkEnvironment()
Checks that the browser enviroment is suitable for the Framework.
Returns an object with the following properties:
isBrowserSupported {boolean} Indicates whether the browser is supported or not.
isFrameworkInstalled {boolean} Indicates whether the Framework is installed or not.
errorDetails {string} An empty string if no error is detected; an error message if an error is detected.

<static> {string} dymo.label.framework.createLabelRenderParamsXml(params)
Creates an XML string suitable to pass to the dymo.label.framework.renderLabel function as renderParamsXml parameter. Returns an XML string.
Parameters:
{object} params
A JavaScript object with the following properties (not all properties must be defined; if a property is not defined, a default value is used):
params.labelColor - The color of the label. labelColor is an object with properties 'a' or 'alpha' to specify color's alpha channel, r/red, g/green, b/blue for red, green, blue channels. The valid range for a/r/g/b fields is [0..255].
params.shadowColor - The color of label shadow.
params.shadowDepth - The shadow width in TWIPS. If '0' is specified, no shadow is rendered.
params.flowDirection - The direction of the label content on the label (left-to-right or right-to-left). Use the dymo.label.framework.FlowDirection enumeration to specify the value.
params.pngUseDisplayResolution - If true, the PNG will be generated using the display resolution. If false, the PNG will be generated using the printer resolution. If the display resolution is used, the resulting PNG will be smaller. Use the printer resolution if the resulting image will be zoomed. This will give the zoomed preview better quality.
Returns:
{string}

<static> {string} dymo.label.framework.createLabelWriterPrintParamsXml(params)
Creates an XML string suitable to to pass to the dymo.label.framework.printLabel function as printParamsXml parameter. Created print parameters are for printing to LabelWriter printers. Returns an XML string.
Parameters:
{object} params
A JavaScript object with the following properties (not all properties must be defined; if a property is not defined, a default value is used):
params.copies - The number of copies to print.
params.jobTitle - The print job title/description.
params.flowDirection - The direction of the label content on the label (left-to-right or right-to-left). Use the dymo.label.framework.FlowDirection enumeration to specify the value.
params.printQuality - The print quality. Use the dymo.label.framework.LabelWriterPrintQuality enumeration to specify the value.
params.twinTurboRoll - The roll to print to if the printer is a TwinTurbo printer. Use the dymo.label.framework.TwinTurboRoll enumeration to specify the value.
Returns:
{string}

<static> {string} dymo.label.framework.createTapePrintParamsXml(params)
Creates an XML string suitable to pass to the dymo.label.framework.printLabel function as printParamsXml parameter. Created print parameters are for printing to Tape printers. Returns an XML string.
Parameters:
{object} params
A JavaScript object with the following properties (not all properties must be defined; if a property is not defined, a default value is used):
params.copies - The number of copies to print.
params.jobTitle - The print job title/description.
params.flowDirection - The direction of the label content on the label (left-to-right or right-to-left). Use the dymo.label.framework.FlowDirection enumeration to specify the value.
params.alignment - The label alignment on the tape. Use the dymo.label.framework.TapeAlignment enumeration to specify the value.
params.cutMode - The cut mode (if auto-cut is supported by the printer). Use the dymo.label.framework.TapeCutMode enumeration to specify the value.
Returns:
{string}

<static> {Array} dymo.label.framework.getPrinters()
Gets a list of all printers supported by the DYMO Label Framework. Results are returned in an array-like object. Each item is of the type dymo.label.framework.PrinterInfo. In addition, items can be accessed by printer name.
Returns:
{Array}

<static> {string} dymo.label.framework.loadImageAsPngBase64(imageUri)
Loads an image from a URL or file and returns it as a base64-encoded PNG stream. The loaded image is not necessarily in PNG format. The image can be in any format supported by the Framework (by DYMO Label v.8). The loaded data can be used to set content for an image object on a label. Note: The comments for dymo.label.framework.openLabelFile apply to this function as well.
Parameters:
{string} imageUri
URL or file name to load the image from.
Returns:
{string} A base64-encoded PNG stream.

<static> {dymo.label.framework.ILabel} dymo.label.framework.openLabelFile(fileName)
Loads label content from a file or URL.
The following considerations should be taken before using this function:
  • The full file name or URL should be specified. The function will not honor relative paths based on document.location.href.
  • The fileName can be an http:// or file:// URL. On Windows the file name can be a regular file name, for example 'c:\users\desktop\address.label'.
  • The content of the label will be loaded synchronously. Therefore, if the remote server is down there will be a timeout.
  • Any local file can be accessed or attempted to be accessed. The function is not limited by any browser restrictions. However, only a valid label file (according to label.xsd schema) can be loaded. This could still be a potential security concern.
  • The URL is not limited to same-site-origin browser policy. Any URL can be opened.
  • The proxy settings are the system default settings, these are not necessarily the browser settings.
Use this function only when there is no other way to load label data. In most cases, label data should be loaded using dymo.label.framework.openLabelXml.
Parameters:
{string} fileName
FileName or URL to load label from. Returns Label object; provides label manipulation methods.
Returns:
{dymo.label.framework.ILabel}

<static> {dymo.label.framework.ILabel} dymo.label.framework.openLabelXml(labelXml)
Loads label content from an XML stream/string. Note: This is the preferred way to load/open label files. Use XMLHttpRequest() or other standard browser methods to get XML string. Returns Label object.
Parameters:
{string} labelXml
The label definition as an XML string.
Returns:
{dymo.label.framework.ILabel}

<static> dymo.label.framework.printLabel(printerName, printParamsXml, labelXml, labelSetXml)
Prints one or more labels.
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} labelXml
The label to print.
{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 dymo.label.framework.LabelSetBuilder class to create a LabelSet, or construct XML manualy according to LabelSet.xsd.

<static> {string} dymo.label.framework.renderLabel(labelXml, renderParamsXml, printerName)
Creates a label raster image that can be used for label previewing. Returns a string that is a base64-encoded PNG stream of the label image. This string can be used as data: url for element. Note: data: urls are not supported by IE6 and IE7. IE8 supports them with a 32KB limit (so it may not be possible to preview 'large' labels).
Parameters:
{string} labelXml
Label to preview.
{string} renderParamsXml
The 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} A base64-encoded PNG stream of the label image.

Copyright (c), 2010, Sanford, L.P. All Rights Reserved.
Documentation generated on Mon Nov 21 2011 17:30:56 GMT-0600 (CST)