Skip to content

A lightweight PHP interface for generating XML jobs compatible with Seagull Scientific's BarTender Barcode Label Software

Notifications You must be signed in to change notification settings

JDBurnZ/PHPBarTender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

PHPBarTender

A lightweight PHP interface for generating XML jobs compatible with Seagull Scientific's BarTender Barcode Label Software

Instantiating a BarTender Object

<?php
require 'bartender.class.php';

$label = 'C:\\some\\path\\to\\label.btw'; // Local path
// OR...
$label = '\\\\some-server\\some\\share\\label.btw'; // Shared path

$printer = 'SomeLocalPrinter'; // Local printer
// OR...
$printer = '\\\\some-server\\some-shared-printer'; // Network printer

// Instantiate the BarTender Object
$bartender = new BarTender($label, $printer);

Generate and return an XML string

$labels = array(
  array ( // First label
    'FieldName1' => 'FieldValue123',
    'FieldName2' => 'FieldValue234'
  ,
  array ( // Second label
    'FieldName1' => 'FieldValue345',
    'FieldName2' => 'FieldValue456'
  )
);
$xml = $bartender->generateToReturn($labels);

Generate XML and save to disc

$labels = array(
  array ( // First label
    'FieldName1' => 'FieldValue123',
    'FieldName2' => 'FieldValue234'
  ,
  array ( // Second label
    'FieldName1' => 'FieldValue345',
    'FieldName2' => 'FieldValue456'
  )
);
$filename = '/path/to/file.xml';
$bartender->generateToFile($labels, $filename);

Donations

PHPBarTender is free software, but donations help the developer spend more time maintaining this projects and others like it.

About

A lightweight PHP interface for generating XML jobs compatible with Seagull Scientific's BarTender Barcode Label Software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages