Skip to main content

Search

Search

Amending Picture In Xml Script

Comments

3 comments

  • Avatar
    Ian Cummings
    Moderator
    In the label format set-up the picture object to be data sourced by a linked file. Specify the path for where the picture files are located. Under the data source tab use "Screen Data" data source and give the sub-string a unique share name.

    Then in your XML use the <NamedSubString> tag to set the name of the sub-sting to the name of the picture file you want the object to be. Example: Picture1.png
    0
  • Avatar
    Ian Cummings
    Moderator
    An alternate option is to data source the picture with base64 data. Share the screen data sub-string as before and then in your XML set the sub-string value with base64 encoded picture data. There are many tools available to encode pictures into base64, some like the below can be found on the web.

    http://www.motobit.com/util/base64-decoder-encoder.asp
    0
  • Avatar
    Legacy Poster
    hi
    used your first suggestion

    <?xml version="1.0" encoding="utf-8"?>
    <XMLScript Version="2.0">

    <Command Name="Job1">
    <Print>
    <Format>C:\Documents and Settings\johnl\My Documents\BarTender\Labels\Label7.btw</Format>
    <NamedSubString Name="OrderCode">
    <Value>12341234</Value>
    </NamedSubString>
    <NamedSubString Name="MaterialCode">
    <Value>M123123</Value>
    </NamedSubString>
    <NamedSubString Name="HS1">
    <Value>Cosh1.jpg</Value>
    </NamedSubString>
    <NamedSubString Name="HS2">
    <Value>Cosh2.jpg</Value>
    </NamedSubString>
    <NamedSubString Name="HS3">
    <Value>Cosh3.jpg</Value>
    </NamedSubString>

    </Print>
    </Command>

    works a treat thank you

    johnl
    0

Please sign in to leave a comment.