Star WebPRNT User's Manual

StarWebPRNT Request Element

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

*1 The checkedblock attribute is always true.

*2 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.

*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 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 … Normal paper
  • black_mark … Black mark paper
  • black_mark_and_detect_at_power_on … Black mark paper (Detect at power on)
Unset

Value

Description
List of StarWebPRNT 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////////////////////////////////4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAA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GAAH///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>

<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 Element

Attribute

NameDescriptionOmission
channelSpecifies the drive terminal of the peripheral
  • '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 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>

<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>