Star webPRNT User's Manual

StarBarcodeEncoder.js

The list of barcode module for drawing to a HTML5 Canvas 2D context is generated.

Constructor

NameDescription
StarBarcodeEncoderCreates StarBarcodeEncoder object.

Method

NameDescription
createUPCECreates module list of UPCE barcode .
createUPCACreates module list of UPCA barcode.
createJAN8Creates module list of JAN/EAN8 barcode.
createJAN13Creates module list of JAN/EAN13 barcode.
createCode39Creates module list of Code39 barcode.
createITFCreates module list of ITF barcode.
createCode128Creates module list of Code128 barcode.
createCode93Creates module list of Code93 barcode.
createNW7Creates module list of NW7 barcode.

Star Printer Compatibility Chart

Please refer to the interface compatibility table by printer model here.

POS Printer
NameFVP
10
TSP
650II
TSP
650II
SK
TSP
700II
TSP
800II
mPOPmC-
Print2
mC-
Print3
TSP
100IV
TSP
100IV
SK
mC-
Label3
createUPCE
createUPCA
createJAN8
createJAN13
createCode39
createITF
createCode128
createCode93
createNW7

Mobile Printer (ESC/POS)
NameSM-S220i
(Excluding Jp model)
SM-S230iSM-T300iSM-T400i
createUPCE
createUPCA
createJAN8
createJAN13
createCode39
createITF
createCode128
createCode93
createNW7

Mobile Printer (StarPRNT)
NameSM-S220i
(Excluding Jp model)
SM-S230iSM-T300iSM-T400iSM-L200SM-L300
createUPCE
createUPCA
createJAN8
createJAN13
createCode39
createITF
createCode128
createCode93
createNW7

StarBarcodeEncoder

Creates StarBarcodeEncoder object.

syntax

StarBarcodeEncoder();

Parameter

NameDescriptionObject typeOmission
----

Return value

DescriptionObject type
StarBarcodeEncoder objectStarBarcodeEncoder
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var builder = new StarBarcodeEncoder();
}
// -->
</script>

createUPCE

Creates module list of UPCE barcode.

syntax

createUPCE(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies UPCE barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createUPCE({data:'01234500006'});
}
// -->
</script>

createUPCA

Creates module list of UPCA barcode.

syntax

createUPCA(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies UPCA barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createUPCA({data:'01234567890'});
}
// -->
</script>

createJAN8

Creates module list of JAN/EAN8 barcode.

syntax

createJAN8(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies JAN/EAN8 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createJAN8({data:'0123456'});
}
// -->
</script>

createJAN13

Creates module list of JAN/EAN13 barcode.

syntax

createJAN13(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies JAN/EAN13 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createJAN13({data:'01234567890'});
}
// -->
</script>

createCode39

Creates module list of Code39 barcode.

syntax

createCode39(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies Code39 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • 'N' … Narrow bar
  • 'n' … Narrow space
  • 'W' … Wide bar
  • 'w' … Wide space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createCode39({data:'0123456789'});
}
// -->
</script>

createITF

Creates module list of ITF barcode.

syntax

createITF(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies ITF barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • 'N' … Narrow bar
  • 'n' … Narrow space
  • 'W' … Wide bar
  • 'w' … Wide space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createITF({data:'0123456789'});
}
// -->
</script>

createCode128

Creates module list of Code128 barcode.

syntax

createCode128(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies Code128 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createCode128({data:'{B0123456789'});
}
// -->
</script>

createCode93

Creates module list of Code93 barcode.

syntax

createCode93(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies Code93 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • '1' … Bar
  • '0' … Space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createCode93({data:'0123456789'});
}
// -->
</script>

createNW7

Creates module list of NW7 barcode.

syntax

createNW7(args);

Parameter

NameDescriptionObject typeOmission
dataSpecifies NW7 barcode dataStringCan't be omitted

Return value

DescriptionObject type
Module list of barcode
  • 'N' … Narrow bar
  • 'n' … Narrow space
  • 'W' … Wide bar
  • 'w' … Wide space
String
Example
<script type='text/javascript' src='js/StarBarcodeEncoder.js'></script>
<script type='text/javascript'>
<!--
function onBuild() {
    var encoder = new StarBarcodeEncoder();

  var lineImage = encoder.createUPCE({data:'A0123456789B'});
}
// -->
</script>