DYMO – Label bestandsformaat overzicht

Informatie (ENG)

DYMO Label Software v.8 has a lot of compelling features from a developer’s point of view. One important change is the new label file format.

In most cases knowing the file format is not necessary because DYMO Label Software (DLS) can be used to design a label visually. However, there are advanced scenarios where knowing the file format can benefit applications that use the DYMO Label SDK. Some of these advanced scenarios are:

  • Using features not available through the DYMO Label Software UI
  • Using features not available through the DYMO Label SDK
  • Generating label files on the fly
  • Creating label files for custom labels

In a series of blog posts we will describe the internals of label file format.

In DYMO Label v.8 we made several improvements to make using label files easier:

  • The label file format is cross-platform; both Windows and Mac versions of DYMO Label Software use the same file format and shared the same built-in layouts. Because file format is the same it is easier to create applications target different platform, e.g. web-based applications.
  • The label file format is XML-based. So the content of a label can be examined by just looking at the label’s XML or by using any XML tool. Also, this allows using any XML API to manipulate label content directly in case the corresponding functionality is unavailable in the DYMO Label SDK or direct manipulation is more convenient in this particular case.
  • The label file format is the same for die-cut labels such as Address or Shipping and for tape/continuous labels such as 12-mm or 19-mm tapes. Strictly speaking the format is not the same but both formats shared some common parts, so it is still easier to use.

So, let look at a sample label that in DYMO Label Software looks like

02 <DieCutLabel Version="8.0" Units="twips">

Line #2 specifies label type as well as version and measurement units. The label type is DieCutLabel, one of two label types currently supported by DYMO Label. DieCutLabel as well as other label type ContinuousLabel will be described with details in a separate blog post. Version=”8.0″ specifies file format version. This version is independent from the version of DYMO Label Software. Currently the only valid version for label file is “8.0” for all versions of DYMO Label Software v.8 up to the latest version, 8.2.1.913. Units=”twips” specifies measurement units used in the file for values like object position or border width. The only supported units for now are “twips” where 1 ‘twip’ is 1/1440 of inch. Other units might be added in future version of DYMO Label. “Twips” are used basically because of “historical” reasons; previous versions of DYMO Label Software used this unit.

Lines #3, #5 specify paper to use to print the label. In this case it is “30352 Address” paper in Landscape orientation. Paper name should be a paper defined by printer driver.

04 <Id>Address</Id>

Line #4 specifies a label ID – a unique identifier for a label type. Basically this ID is used by DYMO Label Software to lookup additional business-related information about the label like available packaging, buy links, etc. It is OK to have ID to be set to empty string if the label is not going to be used from DYMO Label Software.

Lines ##6-8 specify commands used to draw label’s shape, in this case a rounded rectangle. Again, if a label is created on the fly and intended to be printed only, the commands can be omitted.

Lines ## 9-34 specify position and properties for the only text object on the label. More information about objects will be provided in following posts.

Bron @ developers.dymo.com


Gevonden Papernames:
30252 Address
30321 Large Address
30256 Shipping