public class LabelPrinter
extends java.lang.Object
Constructor and Description |
---|
LabelPrinter() |
Modifier and Type | Method and Description |
---|---|
int |
clearOutput()
Clears data in the print buffer.
|
int |
connect(int connectType,
java.lang.String addr)
Connects to a printer.
|
int |
connect(int connectType,
java.lang.String addr,
int port)
Connects to a printer.
|
int |
connect(int connectType,
java.lang.String addr,
int port,
int timeout)
Connects to a printer.
|
int |
connect(int connectType,
UsbDevice device)
Connects to a printer.
|
int |
disconnect()
Disconnects a printer.
|
int |
getBackupSpeed()
Gets the backup speed.
|
int |
getBatchProcessing()
Shows the status if the printer is processing batch print jobs.
|
int |
getCommandInterpreterInAction()
Shows the printer status if the interpreter is processing commands.
|
int |
getContinuousMediaLength()
Gets a paper length for continuous paper.
|
int |
getDoubleHeat()
Gets the double heat option.
|
int |
getFeedSpeed()
Gets the feed speed.
|
int |
getFormatAttribute()
Gets how to print the area where multiple objects are overlapped.
|
int |
getHorizontalMagnification()
Gets the horizontal dot size.
|
int |
getHorizontalOffset()
Gets the horizontal offset to adjust the horizontal printing position on the paper.
|
int |
getLabelSensor()
Gets the label sensor type.
|
int |
getMeasurementUnit()
Gets the measurement unit.
|
int |
getMediaHandling()
Gets the way how to handle media after printing.
|
int |
getPaperError()
Shows the printer status if there is a paper error.
|
int |
getPause()
Shows the status if the printer is in the pause mode.
|
int |
getPrintDarkness()
Gets the print density.
|
int |
getPrinting()
Shows the status if the printer is currently printing.
|
int |
getPrintMethod()
Gets the print method to either thermal transfer or direct thermal.
|
int |
getPrintSpeed()
Gets the print speed.
|
int |
getRibbonEnd()
Shows the printer status if there is a ribbon end error.
|
int |
getSensorLocation()
Gets the sensor to use for the models which have multiple paper sensors, front and rear.
|
int |
getSlewSpeed()
Gets the slew speed.
|
int |
getStartOffset()
Gets the distance between paper sensor and print head to change the print starting position.
|
int |
getStopOffset()
Gets the distance between paper sensor and cutter or peeler to change the print stop position.
|
int |
getVersionCode()
Gets a numerical value for the version number of this library.
|
java.lang.String |
getVersionName()
Gets a string for the version number of this library.
|
int |
getVerticalMagnification()
Gets the vertical dot size.
|
int |
getVerticalOffset()
Gets the vertical offset to adjust the vertical printing position on the paper.
|
int |
getWaitingForPeeling()
Shows the status if the printer is in the wait for peeling status.
|
int |
print(LabelDesign design,
int quantity)
Prints labels by sending a label design created in the LabelDesign class.
|
int |
printerCheck()
Gets the status of the printer and stores information into the properties.
|
CitizenPrinterInfo[] |
searchCitizenPrinter(int ifType,
int searchTime,
int[] status)
Searches available Citizen printers and obtains a list of printer information.
|
java.lang.String[] |
searchLabelPrinter(int ifType,
int searchTime,
int[] status)
Searches available Citizen printers and obtains a list of printer addresses.
|
int |
sendData(byte[] data)
Sends binary data to a printer.
|
int |
setBackupSpeed(int backupSpeed)
Sets the backup speed.
|
int |
setContext(Context context)
This method is used to the USB connection and the search printer.
|
int |
setContinuousMediaLength(int continuousMediaLength)
Sets a paper length for continuous paper.
|
int |
setDoubleHeat(int doubleHeat)
Sets the double heat option.
|
int |
setFeedSpeed(int feedSpeed)
Sets the feed speed.
|
int |
setFormatAttribute(int formatAttribute)
Specifies how to print the area where multiple objects are overlapped.
|
int |
setHorizontalMagnification(int horizontalMagnification)
Sets the horizontal dot size.
|
int |
setHorizontalOffset(int horizontalOffset)
Sets the horizontal offset to adjust the horizontal printing position on the paper.
|
int |
setLabelSensor(int labelSensor)
Sets the label sensor type.
|
void |
setLog(int mode,
java.lang.String path,
int maxSize)
Sets the logging function.
|
int |
setMeasurementUnit(int measurementUnit)
Sets the measurement unit.
|
int |
setMediaHandling(int mediaHandling)
Sets the way how to handle media after printing.
|
int |
setPrintDarkness(int printDarkness)
Sets the print density.
|
int |
setPrintMethod(int printMethod)
Dets the print method to either thermal transfer or direct thermal.
|
int |
setPrintSpeed(int printSpeed)
Sets the print speed.
|
int |
setSensorLocation(int sensorLocation)
Sets the sensor to use for the models which have multiple paper sensors, front and rear.
|
int |
setSlewSpeed(int slewSpeed)
Sets the slew speed.
|
int |
setStartOffset(int startOffset)
Specifies the distance between paper sensor and print head to change the print starting position.
|
int |
setStopOffset(int stopOffset)
Specifies the distance between paper sensor and cutter or peeler to change the print stop position.
|
int |
setVerticalMagnification(int verticalMagnification)
Sets the vertical dot size.
|
int |
setVerticalOffset(int verticalOffset)
Sets the vertical offset to adjust the vertical printing position on the paper.
|
int |
storeNVBitmap(java.lang.String filePath,
java.lang.String name,
int rotation,
int width,
int height)
Stores a bitmap image into the flash memory.
|
public int clearOutput()
public int connect(int connectType, java.lang.String addr)
connectType
- : Connect typeaddr
- : IP address to connect or Bluetooth device address or Bluetooth device namepublic int connect(int connectType, java.lang.String addr, int port)
connectType
- : Connect typeaddr
- : IP address to connect or Bluetooth device address or Bluetooth device nameport
- : Connection port numbercpublic int connect(int connectType, java.lang.String addr, int port, int timeout)
connectType
- : Connect typeaddr
- :IP address to connect or Bluetooth device address or Bluetooth device nameport
- : Connection port numbertimeout
- : Timeout (msec)public int connect(int connectType, UsbDevice device)
connectType
- : Connect typedevice
- : UsbDevice class (android.hardware.usb.UsbDevice)public int disconnect()
public int getBackupSpeed()
public int getBatchProcessing()
public int getCommandInterpreterInAction()
public int getContinuousMediaLength()
public int getDoubleHeat()
public int getFeedSpeed()
public int getFormatAttribute()
public int getHorizontalMagnification()
public int getHorizontalOffset()
public int getLabelSensor()
public int getMeasurementUnit()
public int getMediaHandling()
public int getPaperError()
public int getPause()
public int getPrintDarkness()
public int getPrinting()
public int getPrintMethod()
public int getPrintSpeed()
public int getRibbonEnd()
public int getSensorLocation()
public int getSlewSpeed()
public int getStartOffset()
public int getStopOffset()
public int getVersionCode()
public java.lang.String getVersionName()
public int getVerticalMagnification()
public int getVerticalOffset()
public int getWaitingForPeeling()
public int print(LabelDesign design, int quantity)
design
- : Design dataquantity
- : Quantitypublic int printerCheck()
public CitizenPrinterInfo[] searchCitizenPrinter(int ifType, int searchTime, int[] status)
ifType
- : Connect typesearchTime
- : Search timestatus
- : Error codepublic java.lang.String[] searchLabelPrinter(int ifType, int searchTime, int[] status)
ifType
- : Connect typesearchTime
- : Search timestatus
- : Error codepublic int sendData(byte[] data)
data
- : Send datapublic int setBackupSpeed(int backupSpeed)
backupSpeed
- : Backup speedpublic int setContext(Context context)
context
- : Context (android.content.Context)public int setContinuousMediaLength(int continuousMediaLength)
continuousMediaLength
- : Continuous media lengthpublic int setDoubleHeat(int doubleHeat)
doubleHeat
- : Double heatpublic int setFeedSpeed(int feedSpeed)
feedSpeed
- : Feed speedpublic int setFormatAttribute(int formatAttribute)
formatAttribute
- : Format attributepublic int setHorizontalMagnification(int horizontalMagnification)
horizontalMagnification
- : Horizontal magnificationpublic int setHorizontalOffset(int horizontalOffset)
offset
- : Horizontal offsetpublic int setLabelSensor(int labelSensor)
labelSensor
- : Label sensorpublic void setLog(int mode, java.lang.String path, int maxSize)
mode
- : Logging modepath
- : File path to storemaxSize
- : Maximum Log Sizepublic int setMeasurementUnit(int measurementUnit)
measurementUnit
- : Measurement unitpublic int setMediaHandling(int mediaHandling)
mediaHandling
- : Media handlingpublic int setPrintDarkness(int printDarkness)
printDarkness
- : Print darknesspublic int setPrintMethod(int printMethod)
printMethod
- : Print methodpublic int setPrintSpeed(int printSpeed)
printSpeed
- : Print speedpublic int setSensorLocation(int sensorLocation)
sensorLocation
- : Sensor locationpublic int setSlewSpeed(int slewSpeed)
slewSpeed
- : Slew speedpublic int setStartOffset(int startOffset)
startOffset
- : Start offsetpublic int setStopOffset(int stopOffset)
stopOffset
- : Stop offsetpublic int setVerticalMagnification(int verticalMagnification)
verticalMagnification
- : Vertical magnificationpublic int setVerticalOffset(int verticalOffset)
offset
- : Vertical offsetpublic int storeNVBitmap(java.lang.String filePath, java.lang.String name, int rotation, int width, int height)
filePath
- :name
- :rotation
- :width
- :height
- :