Adlib home page > Support > Downloads > Example XSLT stylesheet for labels


Example XSLT stylesheet for labels

Here you can download an example of an XSLT stylesheet with which you can print barcode labels containing object images, to a normal printer. You can print to paper or label sheets. The example is really just that, a very basic example to show you how you can build such stylesheets yourself. You can change it all you like, and to get it working in your Adlib system you do indeed have to make some changes to it.

Proceed as follows:

  1. You have to have a barcode font (a Code 39 font for example) installed on the computer from which you want to print. If you haven't got one, you'll have buy such a font first, find a freely available font on the internet or try to install a demo version of a suitable font. (Without a barcode font, the object number itself will be printed on the label instead.) After installing the font, you can find it in the Fonts section of your Control panel. Right-click it and choose Properties to find its Title: this is the name to reference the font by later on.
  2. Unzip the .zip file downloaded here into an \xslt subfolder in your application. Create the folder if it doesn't exist yet and put it on the same level as the other Adlib subfolders (like \adapls, \data and such).
  3. Open the XSLT file in a simple text editor and adjust the fixed paths to the \images folder and the \xslt folder to match your environment. Also change the name of the referred barcode font (currently BC39) to the title you found in step 1. You can also change the conditions to print the three different "vrachtwagen#.png" icons to something else: currently these conditions are rather silly, because they check the first letter of the object name to select an icon. You can also change the icons themselves, come up with different conditions, etc. Feel free to experiment with the stylesheet.
  4. Setup the XSLT stylesheet as an output format for the Internal object catalogue. See the Designer Help for instructions on how to do this.
  5. Open your Museum application and mark some object records containing images: more or less square or vertically oriented images work best in this example, as are relatively short object numbers so that the barcode fits on one line.
  6. In the Adlib File menu, select your new Output format to print to it.


Adlib XSLT label print