Star webPRNT User's Manual

Star webPRNT Request Element

NameDescriptionStar webPRNT
Browser
Star
Thermal Printer
with Star webPRNT
Star
Dot Printer
with Star webPRNT
<root>Root Element✓*1
<alignment>Alignment Element
<barcode>Barcode Element-
<bitImage>Bitimage Element
<cutpaper>Cut paper Element
<feed>Feed Element
<holdprint>Hold print Element-
<initialization>Initialization Element
<logo>Logo Element
<pdf417>PDF417Element-
<peripheral>Peripheral(Drawer) Element
<qrcode>QR code Element-
<rawdata>*2Raw data Element✓ *3✓ *3✓ *3
<ruledline>Horizontal ruled line Element
<sound>Sound Element
<sound_with_setting>Melody speaker Element--
<text>Text Element✓ *4✓ *4✓ *4 *5

*1 The checkedblock attribute is always true.

*2 Usage of this element, to send device specific commands, is discouraged in order to maintain compatibility across all supported printers.
Developers are encouraged to use the general Star API wherever possible in order to utilize printer functions.
In the case that the Star API does not offer a feature necessary for your software, please let us know so that we can consider inclusion in a future software update.

*3 Do not send an Initialization command (ESC @).
If want to send the command , please use the <initialization> (Initialization element).

*4 It is supported to the print of the UTF-8 character code.
Please refer to Appendix UTF-8 for getting an situation of each model's support.
The codepage attributes “shift_jis”, “gb18030”, “gb2312”, “big5” and “korea” are supported only with Star webPRNT Browser.
In the case of using Star webPRNT Browser, do not set “utf8” for Attribute of codepage with non UTF-8 supported models.

*5 In Dot Printer, handlings of the parameter are different partly. The differences are as follows.
invert : In the case of the model of printing two-colors,
             If the monochrome inversion printing is valid, printing is red.
             If the monochrome inversion printing is invalid, printing is black.
linespace : The unit of 1 dot is 1/144 inch. In addition, can set the specified value(1 - 255).
width : Only 1 and 2 is supported.
height : Only 1 and 2 is supported.
font : "fontA" is 7 by 9 font. "fontB" is 5 by 9(2P-1).

<root>

Root Element

Attribute

NameDescriptionOmission
checkedblockSpecifies waiting for the completion of printing
  • true … Wait for the completion of printing
  • false … Not wait for the completion of printing
'true'
papertypePaper type
  • normal … Nomal paper
  • black_mark … Black mark detection valid
  • black_mark_and_detect_at_power_on … Black mark detection valid with detect at power on
  • gap … Gap detection valid for die-cut label paper, etc
  • gap_and_detect_at_power_on … Gap detection valid with detect at power on for die-cut label paper, etc
Unset
holdprint_timeoutTimeout value for awaiting paper removal (ms)10000

Value

Description
List of Star webPRNT Request Element
Example
<root>
  <alignment position='center'/>
  <text>Star Micronics\x0a</text>
  <cutpaper feed='true' type='partial'/>
</root>

<alignment>

Alignment Element

Attribute

NameDescriptionOmission
poistionSpecifies position alignment
  • 'left' … Left alignment
  • 'center' … Center alignment
  • 'right' … Right alignment
'left'

Value

Description
Ignore
Example
<root>
  <alignment position='center'/>
</root>

<barcode>

Barcode Element

Attribute

NameDescriptionOmission
symbologySpecifies barcode symbol
  • 'UPCE' … UPC-E
  • 'UPCA' … UPC-A
  • 'JAN8' … JAN/EAN8
  • 'JAN13' … JAN/EAN13
  • 'Code39' … Code39
  • 'ITF' … ITF
  • 'Code128' … Code128
  • 'Code93' … Code93
  • 'NW7' … NW-7
'UPCE'
widthSpecifies barcode width
  • 'width2' … Minimum module 2dots
  • 'width3' … Minimum module 3dots
  • 'width4' … Minimum module 4dots
  • 'width_mode1' … Mode1
  • 'width_mode2' … Mode2
  • 'width_mode3' … Mode3
  • 'width_mode4' … Mode4
  • 'width_mode5' … Mode5
  • 'width_mode6' … Mode6
  • 'width_mode7' … Mode7
  • 'width_mode8' … Mode8
  • 'width_mode9' … Mode9
Note. Refer to the command specifications.
'width3'
heightSpecifies barcode height (Unit of dot)'162'
hriSpecifies HRI characters
  • 'true' … Adds HRI characters
  • 'false' … No added HRI characters
'true'

Value

Description
Specifies barcode data
Note. Refer to the command specifications.
Example
<root>
  <barcode symbology='JAN13' width='width2' hri='false' height='40'>012345678901</barcode>
</root>

<bitImage>

Bitimage Element

Attribute

NameDescriptionOmission
widthSpecifies the image width (Unit of dot)'0'
heightSpecifies the image height (Unit of dot)
Max value: 2400
'0'

Value

Description
Specifies raster graphic image data
Note: Base64 encoding
Example
<root>
  <bitimage width='200' height='50'>f////////////////////////////////4AAAAAAAAAAAA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/P4fgAAAAAAAAYAAAAAAH8f8AAAf+AAH8Pz+H4AAAAAAAAGAAAAAAP+D/8AAD/+AB/D8/h+AAAAAAAABgAB////+AP///AH//+fw/P4fgAAAAAAAAYAAf///+AAf//wAf//n8Pz+H4AAAAAAAAGAAH///4AAAf/8AAf/x/D8/h+AAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf////////////////////////////////8
=</bitimage>
</root>

<cutpaper>

Cut paper Element

Attribute

NameDescriptionOmission
typeSpecifies cut type
  • 'full' … Full cut
  • 'partial' … Partial cut
'full'
feedSpecifies feed to cut position
  • 'true' … Feed
  • 'false' … No feed (Current position)
'true'

Value

Description
Ignore
Example
<root>
  <cutpaper feed='true' type='partial'/>
</root>

<feed>

Feed Element

Attribute

NameDescriptionOmission
lineSpecifies the paper feed space (Unit of line)'0'
unitSpecifies the paper feed space (Unit of dot)'0'

Value

Description
Ignore
Example
<root>
  <feed line='2' unit='8'/>
</root>

<holdprint>

Hold print Element by Star webPRNT

Attribute

NameDescriptionOmission
type Specifies paper hold control
  • 'valid' … valid
  • 'invalid' … invalid
  • 'default' … Follow the memory switch setting
'default'

Value

Description
Ignore
Example
<root>
  <alignment position='center'/>
  <holdprint type='valid'/>
  <text>Star Micronics\x0a</text>
  <cutpaper feed='true' type='partial'/>
</root>
When this function is enabled, the next printing will fail if the paper has not been removed by the time the paper removal wait timeout time has elapsed. The paper removal wait timeout time can be set by using the holdprint_timeout property in StarWebPrintTrader. It is also possible to determine whether or not printing failed due to this function by checking the status of isPaperPresent in StarWebPrintTrader.

<initialization>

Initialization Element

Attribute

NameDescriptionOmission
resetSpecifies hardware reset
  • 'true' … Execute hardware reset
  • 'false' … Not execute hardware reset (Only command initialization)
'false'
printSelf printing after hardware reset
  • 'true' …Execute self print
  • 'false' … Not execute self print
'false'

Value

Description
Ignore
Example
<root>
  <initialization reset='false' print='false'/>
</root>

<pdf417>

PDF417Element

Attribute

NameDescriptionOmission
lineSpecifies number of lines
Note. Refer to the command specifications.
'0'
columnSpecifies number of columns
Note. Refer to the command specifications.
'0'
levelSpecifies security level
  • 'level0' … Security level0
  • 'level1' … Security level1
  • 'level2' … Security level2
  • 'level3' … Security level3
  • 'level4' … Security level4
  • 'level5' … Security level5
  • 'level6' … Security level6
  • 'level7' … Security level7
  • 'level8' … Security level8
'level1'
moduleSpecifies module size (Unit of dot)'2'
aspectSpecifies aspect ratio'3'

Value

Description
Specifies PDF417 data
Note. Refer to the command specifications.
Example
<root>
  <pdf417 level='level1' line='0' column='0' module='2' aspect='3'>http://www.starmicronics.com/</pdf417>
</root>

<peripheral>

Peripheral(Drawer) Element

Attribute

NameDescriptionOmission
channelSpecifies the drive terminal of the peripheral(drawer)
  • '1' … Peripheral drive terminal1
  • '2' … Peripheral drive terminal2 (Energizing time and Delay time ignore)
'1'
onEnergizing time (Unit of 1mSec)'200'
offDelay time (Unit of 1mSec)'200'

Value

Description
Ignore
Example
<root>
  <peripheral channel='1' on='200' off='200'/>
</root>

<qrcode>

QR code Element

Attribute

NameDescriptionOmission
modelSpecifies model
  • 'model1' … Model1
  • 'model2' … Model2
'model2'
levelSpecifies mistake correction level
  • 'level_l' … Mistake Correction LevelL
  • 'level_m' … Mistake Correction LevelM
  • 'level_q' … Mistake Correction LevelQ
  • 'level_h' … Mistake Correction LevelH
'level_l'
cellSpecifies cell size (Unit of dot)'3'

Value

Description
Specifies Qr code data
Note. Refer to the command specifications.
Example
<root>
  <qrcode model='model2' level='level_l' cell='3'>http://www.starmicronics.com/</qrcode>
</root>

<rawdata>

Raw data Element

Attribute

NameDescriptionOmission
---

Value

Description
Specifies raw data
Note.Base64 encoding
Example
<root>
  <rawdata>MTIzNDU=</rawdata>
</root>
  • Usage of this method, to send device specific commands, is discouraged in order to maintain compatibility across all supported printers.
  • Developers are encouraged to use the general Star API wherever possible in order to utilize printer functions.
  • In the case that the Star API does not offer a feature necessary for your software, please let us know so that we can consider inclusion in a future software update.

<ruledline>

Horizontal ruled line Element

Attribute

NameDescriptionOmission
thicknessSpecifies ruled line
  • 'thin' … Thin line
  • 'medium' … Medium line
  • 'thick' … Thick line
  • 'double_thin' … Thin, double line
  • 'double_medium' … Medium, double line
  • 'double_thick' … Thick, double line
'medium'
widthSpecifies width (Unit of dot)'832'

Value

Description
Ignore
Example
<root>
  <ruledline thickness='thin' width='200'/>
</root>

<sound>

Sound Element

Attribute

NameDescriptionOmission
channelSpecifies the drive terminal of the peripheral(buzzer)
  • '1' … Buzzer drive terminal1
  • '2' … Buzzer drive terminal2
'1'
repeatSpecifies the number of repeats'1'

Value

Description
Ignore
Example
<root>
  <sound channel='1' repeat='1'/>
</root>
Note: Do not use this element with anything other than the buzzer connected. It may not work properly, and the printer or the peripheral unit in use may cause damage.

<sound_with_setting>

Melody speaker Element

Attribute

NameDescriptionOmission
sound_storage_areaSpecifies sound storage area
  • 1 … Sound storage area 1
  • 2 … Sound storage area 2
Follow the DIP switch setting of mC-Sound
sound_numberSpecifies sound number
  • 0 … Sound number0
  • 1 … Sound number 1
  • 2 … Sound number 2
  • 3 … Sound number 3
  • 4 … Sound number 4
  • 5 … Sound number 5
  • 6 … Sound number 6
  • 7 … Sound number 7
Follow the DIP switch setting of mC-Sound
volumeSpecifies volume
  • 'volume0' … Volume 0 (mute)
  • 'volume1' … Volume 1 (minimum)
  • 'volume2' … Volume 2
  • 'volume3' … Volume 3
  • 'volume4' … Volume 4
  • 'volume5' … Volume 5
  • 'volume6' … Volume 6
  • 'volume7' … Volume 7
  • 'volume8' … Volume 8
  • 'volume9' … Volume 9
  • 'volume10' … Volume 10
  • 'volume11' … Volume 11
  • 'volume12' … Volume 12
  • 'volume13' … Volume 13
  • 'volume14' … Volume 14
  • 'volume15' … Volume 15 (maximum)
  • 'volume_off' … Mute
  • 'volume_min' … Minimum Volume
  • 'volume_max' … Maximum Volume
Follow the DIP switch setting of mC-Sound

Value

Description
Ignore
Example
<script type='text/javascript' src='js/StarWebPrintBuilder.js'></script>
<script type='text/javascript'>
 <!--
function onBuild() {
    var builder = new StarWebPrintBuilder();
    var request = builder.createSoundWithSettingElement({'sound_storage_area':1,'sound_number':0,'volume':'volume6'}); 
// -->
</script>
Note: Do not use this element with anything other than the melody speaker connected. It may not work properly, and the printer or the peripheral unit in use may cause damage.

<text>

Text Element

Attribute

NameDescriptionOmission
codepageSpecifies CodePage
  • 'utf8' … UTF-8
  • 'cp437' … CodePage437
  • 'cp737' … CodePage737
  • 'cp772' … CodePage772
  • 'cp774' … CodePage774
  • 'cp851' … CodePage851
  • 'cp852' … CodePage852
  • 'cp855' … CodePage855
  • 'cp857' … CodePage857
  • 'cp858' … CodePage858
  • 'cp860' - 'cp866' … CodePage860 - 866
  • 'cp869' … CodePage869
  • 'cp874' … CodePage874
  • 'cp928' … CodePage928
  • 'cp932' … CodePage932(Katakana)
  • 'cp998' … CodePage998(Normal)
  • 'cp999' … CodePage999
  • 'cp1001' … CodePage1001
  • 'cp1250' - 'cp1252' … CodePage1250 - 1252
  • 'cp2001' … CodePage2001
  • 'cp3001' … CodePage3001
  • 'cp3002' … CodePage3002
  • 'cp3011' … CodePage3011
  • 'cp3012' … CodePage3012
  • 'cp3021' … CodePage3021
  • 'cp3041' … CodePage3041
  • 'cp3840' … CodePage3840
  • 'cp3841' … CodePage3841
  • 'cp3843' - 'cp3848' … CodePage3843 - 3848
  • 'blank' … User Setting (Blank CodePage)
  • 'shift_jis' … Shift_JIS
  • 'gb18030' … GB18030
  • 'gb2312' … GB2312
  • 'big5' … Big5
  • 'korea' … korea
Unchanged
internationalSpecifies international characters
  • 'usa' … USA
  • 'france' … France
  • 'germany' … Germany
  • 'uk' … UK
  • 'denmark' … Denmark
  • 'sweden' … Sweden
  • 'italy' … Italy
  • 'spain' … Spain
  • 'japan' … Japan
  • 'norway' … Norway
  • 'denmark2' … DenmarkII
  • 'spain2' … SpainII
  • 'latin_america' … Latin America
  • 'korea' … Korea
  • 'ireland' … Ireland
  • 'legal' … Legal
Unchanged
characterspaceSpecifies character space (Unit of dot)Unchanged
emphasisSpecifies emphasized
  • 'true' … Specifies emphasized
  • 'false' … Cancels emphasized
Unchanged
invertSpecifies inversion
  • 'true' … Specifies inversion
  • 'false' … Cancels inversion
Unchanged
linespaceSpecifies line space (Unit of dot)
  • 24 … Specifies 3mm line feed amount
  • 32 … Specifies 4mm line feed amount
Unchanged
widthSpecifies expanded width
  • 1 … Cancels expanded width
  • 2 … Specifies 2x width expansion
  • 3 … Specifies 3x width expansion
  • 4 … Specifies 4x width expansion
  • 5 … Specifies 5x width expansion
  • 6 … Specifies 6x width expansion
Unchanged
heightSpecifies expanded height
  • 1 … Cancels expanded height
  • 2 … Specifies 2x height expansion
  • 3 … Specifies 3x height expansion
  • 4 … Specifies 4x height expansion
  • 5 … Specifies 5x height expansion
  • 6 … Specifies 6x height expansion
Unchanged
fontSpecifies font style
  • 'font_a' … Font-A (12 x 24 dots)
  • 'font_b' … Font-B (9 x 24 dots)
Unchanged
undellineSpecifies underline
  • 'true' … Specifies underline
  • 'false' … Cancels underline
Unchanged

Value

Description
Specifies text data
Example
<root>
  <text codepage='cp998' international='usa' characterspace='0' emphasis='false' invert='false' linespace='32' width='1' height='1' font='font_a' underline='false'>Star Micronics\x0a</text>
</root>