com.analogics.thermalAPI
Class Bluetooth_Printer_2inch_ThermalAPI

java.lang.Object
  extended by com.analogics.thermalAPI.Bluetooth_Printer_2inch_ThermalAPI

public class Bluetooth_Printer_2inch_ThermalAPI
extends java.lang.Object

Use the methods in this Class to prepare the data to print with the Bluetooth printer and pass the return values to the methods in the class "com.analogics.thermalprinter.AnalogicsThermalPrinter"


Constructor Summary
Bluetooth_Printer_2inch_ThermalAPI()
           
 
Method Summary
 java.lang.String BackSpace()
          This methods will delete previous character in printer buffer.
 java.lang.String barcode_Codabar(java.lang.String data)
          This method will print "Codabar" barcode Character set: 0-9, $, -, :, /, ., + .
 java.lang.String barcode_Code_128_Alpha_Numerics(java.lang.String data)
          This method is to frame the data to print the barcode in Code_128 and the data is Alpha numerics.The barcode will be 10mm high and followed with human readable text.
 java.lang.String barcode_Code_128_Only_Alpabates(java.lang.String data)
          This method is to frame the data to print the barcode in Code_128 and the data is only Alphabets.The barcode will be 10mm high and followed with human readable text.
 java.lang.String barcode_Code_128_Only_Numerics(java.lang.String data)
          This method is to frame the data to print the barcode in Code_128 and the data is only Numerics.The barcode will be 10mm high and followed with human readable text.
 java.lang.String barcode_Code_39(java.lang.String data)
          This method to frame the data to print barcode and followed with human readable text.Supported Character set:43 ASCII characters including A to Z (upper case only),0-9,.(period),- $,/,+,% and space.
 java.lang.String barcode_EAN_JAN_13(java.lang.String data)
          This method will print "EAN_JAN_13" barcode it should requires 13 digits.
 java.lang.String barcode_EAN_JAN_8(java.lang.String data)
          This method will print "EAN_JAN_8" barcode it should requires 8 digits.
 java.lang.String barcode_UCC_EAN_128(java.lang.String data)
          The UCC/EAN-128 specification is an internationally recognized format for application identifiers in code 128 bar codes.
 java.lang.String barcode_UPC_A(java.lang.String data)
          This method will print "UPC-A" barcode it should requires 12 digits.
 java.lang.String barcode_UPC_E(java.lang.String data)
          This method will print "UPC-E" barcode it should requires 7 digits.
 java.lang.String barcodeOnly_Code_39(java.lang.String data)
          This method to frame the data to print barcode only.Supported Character set:43 ASCII characters including A to Z (upper case only),0-9,.(period),- $,/,+,% and space.
 java.lang.String bell()
          This method is to Causes the printer’s bell to sound
 java.lang.String cancel()
          This method is to Deletes all data in the printer’s input buffer and resets the printer to power up default values.
 java.lang.String carriage_Return()
          This methods will advance the paper by one line and set the position to beginning of next line.
 java.util.List<java.lang.String> Dynamic_ImagePrint(java.lang.String imagepath)
          This method is to print the image ,pass the retutn value to the "print2inchImage" or "print3inchImage" methods in class "com.analogics.AnalogicsPrinter" Note:- use "print2inchImage" method for 2 inch thermal bluetooth printers and "print3inchImage" method for 3 inch thermal bluetooth printers Permissions needed :::
 java.lang.String font_Courier_10(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "10" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print .
 java.lang.String font_Courier_19(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "19" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_20(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "20" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_24(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "24" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_25(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "25" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_27(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "27" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_29(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "29" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_32(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "32" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_34(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "34" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_38(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "38" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_42(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "42" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Courier_48(java.lang.String data)
          This method will invokes the fontstyle "Courier" and "48" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_Double_Height_Off()
          This method will turn off double height font.
 java.lang.String font_Double_Height_On()
          This method will double the height of font .
 java.lang.String font_Double_Height_Width_Off()
          This method will turn off double height and double width font.
 java.lang.String font_Double_Height_Width_On()
          This method will double the height and width of font.
 java.lang.String font_Emphasized_Off()
          When this mode is enables the printer will decrease the intensity of fonts.
 java.lang.String font_Emphasized_On()
          When this mode is enables the printer will increase the intensity of fonts.
 java.lang.String font_SansSerif_32(java.lang.String data)
          This method will invokes the fontstyle "Sans Serif" and "32" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_SansSerif_34(java.lang.String data)
          This method will invokes the fontstyle "Sans Serif" and "34" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_SansSerif_38(java.lang.String data)
          This method will invokes the fontstyle "Sans Serif" and "38" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String font_SansSerif_8(java.lang.String data)
          This method will invokes the fontstyle "Sans Serif" and "8" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print
 java.lang.String form_Feed()
          This method will print the current line and advance to beginning of next line.
static Bitmap getResizedBitmap(Bitmap bm, int newHeight, int newWidth)
           
 java.lang.String horizontal_Tab()
          This methods will Advances to the next horizontal tab stop.
 java.lang.String line_Feed()
          This methods will advance the paper by one line and set the position to beginning of next line.
 byte[] prepare2InchImageData(java.lang.String address, java.lang.String hexStr, int height)
          This method is to prepare the data to print the image in 2 inch Bluetooth printer pass the return value to the method "Call_PrintertoPrint(String address, byte[] printdata)
 java.lang.String print_Contrast(int n)
          This method is to Contrast command can be used to increase or decrease print intensity.
 java.lang.String Reset()
          This method is to Deletes all data in the printer’s buffer and resets the printer to power up default values.
 java.lang.String textLineSpacing(int n)
          This method sets the number of dot rows to be inserted in between two successive character line.
 java.lang.String turn_Printer_Off()
          This method is to Causes the printer to turn itself off
 java.lang.String variable_Size_Line_Feed(int n)
          This method will advance printer by n dot lines(n x 0.125mm) ( the height of dot line is( 0.125 mm).
 java.lang.String variable_Size_Reverse_Line_Feed(int n)
          This method will Causes paper to moved in reverse direction by n dot lines ( n x 0.125mm) Where n is 0 < n < 255
 java.lang.String vertical_Tab()
          This method will advances the paper five lines.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bluetooth_Printer_2inch_ThermalAPI

public Bluetooth_Printer_2inch_ThermalAPI()
Method Detail

font_Courier_10

public java.lang.String font_Courier_10(java.lang.String data)
This method will invokes the fontstyle "Courier" and "10" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print .


font_Courier_19

public java.lang.String font_Courier_19(java.lang.String data)
This method will invokes the fontstyle "Courier" and "19" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_20

public java.lang.String font_Courier_20(java.lang.String data)
This method will invokes the fontstyle "Courier" and "20" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_24

public java.lang.String font_Courier_24(java.lang.String data)
This method will invokes the fontstyle "Courier" and "24" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_25

public java.lang.String font_Courier_25(java.lang.String data)
This method will invokes the fontstyle "Courier" and "25" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_27

public java.lang.String font_Courier_27(java.lang.String data)
This method will invokes the fontstyle "Courier" and "27" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_29

public java.lang.String font_Courier_29(java.lang.String data)
This method will invokes the fontstyle "Courier" and "29" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_32

public java.lang.String font_Courier_32(java.lang.String data)
This method will invokes the fontstyle "Courier" and "32" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_34

public java.lang.String font_Courier_34(java.lang.String data)
This method will invokes the fontstyle "Courier" and "34" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_38

public java.lang.String font_Courier_38(java.lang.String data)
This method will invokes the fontstyle "Courier" and "38" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_42

public java.lang.String font_Courier_42(java.lang.String data)
This method will invokes the fontstyle "Courier" and "42" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Courier_48

public java.lang.String font_Courier_48(java.lang.String data)
This method will invokes the fontstyle "Courier" and "48" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_SansSerif_32

public java.lang.String font_SansSerif_32(java.lang.String data)
This method will invokes the fontstyle "Sans Serif" and "32" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_SansSerif_34

public java.lang.String font_SansSerif_34(java.lang.String data)
This method will invokes the fontstyle "Sans Serif" and "34" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_SansSerif_38

public java.lang.String font_SansSerif_38(java.lang.String data)
This method will invokes the fontstyle "Sans Serif" and "38" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_SansSerif_8

public java.lang.String font_SansSerif_8(java.lang.String data)
This method will invokes the fontstyle "Sans Serif" and "8" characters in a line and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Double_Height_On

public java.lang.String font_Double_Height_On()
This method will double the height of font . This method must be sent before start of a line. If sent in between a new line will be inserted and following characters will be printed in double height. Note: Printer will continue printing in double height till it is turned off. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Double_Height_Off

public java.lang.String font_Double_Height_Off()
This method will turn off double height font. This must be sent before printing, If sent in between a new line will be inserted and following characters will be printed in normal height. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Double_Height_Width_On

public java.lang.String font_Double_Height_Width_On()
This method will double the height and width of font. This method must be sent before start of a line. If sent in between a new line will be inserted and following characters will be printed in double height and double width. Note: Printer will continue printing in double height and double width till it is turned off. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Double_Height_Width_Off

public java.lang.String font_Double_Height_Width_Off()
This method will turn off double height and double width font. This must be sent before printing, If sent in between a new line will be inserted and following characters will be printed in normal height. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


textLineSpacing

public java.lang.String textLineSpacing(int n)
This method sets the number of dot rows to be inserted in between two successive character line. The height of dot rows is 0.125mm. Note:- Where 0 < n < 10, and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


font_Emphasized_On

public java.lang.String font_Emphasized_On()
When this mode is enables the printer will increase the intensity of fonts. This command must be sent before start of new line. If sent in between a new line will be inserted and this will take effect from next line. Note: Printing speed will be slower when this mode is enabled. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to enable


font_Emphasized_Off

public java.lang.String font_Emphasized_Off()
When this mode is enables the printer will decrease the intensity of fonts. This command must be sent before start of new line. If sent in between a new line will be inserted and this will take effect from next line. and pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to enable


carriage_Return

public java.lang.String carriage_Return()
This methods will advance the paper by one line and set the position to beginning of next line. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class


BackSpace

public java.lang.String BackSpace()
This methods will delete previous character in printer buffer. This can go up to beginning current line.


horizontal_Tab

public java.lang.String horizontal_Tab()
This methods will Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right margin, the print position will advance to the beginning of the next line. default tab stops are set to every fourth column , i.e. 5,9,13,17,21,25,29,33…..


line_Feed

public java.lang.String line_Feed()
This methods will advance the paper by one line and set the position to beginning of next line.


variable_Size_Line_Feed

public java.lang.String variable_Size_Line_Feed(int n)
This method will advance printer by n dot lines(n x 0.125mm) ( the height of dot line is( 0.125 mm). Where n is 0 < n < 255


variable_Size_Reverse_Line_Feed

public java.lang.String variable_Size_Reverse_Line_Feed(int n)
This method will Causes paper to moved in reverse direction by n dot lines ( n x 0.125mm) Where n is 0 < n < 255


vertical_Tab

public java.lang.String vertical_Tab()
This method will advances the paper five lines. If a partial line exits in a buffer that line will be printed including a carriage return and line feed, and the paper advanced five lines.


form_Feed

public java.lang.String form_Feed()
This method will print the current line and advance to beginning of next line. If current line partial remaining positions will be filled with spaces.


barcode_Code_39

public java.lang.String barcode_Code_39(java.lang.String data)
This method to frame the data to print barcode and followed with human readable text.Supported Character set:43 ASCII characters including A to Z (upper case only),0-9,.(period),- $,/,+,% and space. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcodeOnly_Code_39

public java.lang.String barcodeOnly_Code_39(java.lang.String data)
This method to frame the data to print barcode only.Supported Character set:43 ASCII characters including A to Z (upper case only),0-9,.(period),- $,/,+,% and space. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_Code_128_Only_Alpabates

public java.lang.String barcode_Code_128_Only_Alpabates(java.lang.String data)
This method is to frame the data to print the barcode in Code_128 and the data is only Alphabets.The barcode will be 10mm high and followed with human readable text. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_Code_128_Only_Numerics

public java.lang.String barcode_Code_128_Only_Numerics(java.lang.String data)
This method is to frame the data to print the barcode in Code_128 and the data is only Numerics.The barcode will be 10mm high and followed with human readable text. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_Code_128_Alpha_Numerics

public java.lang.String barcode_Code_128_Alpha_Numerics(java.lang.String data)
This method is to frame the data to print the barcode in Code_128 and the data is Alpha numerics.The barcode will be 10mm high and followed with human readable text. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_UCC_EAN_128

public java.lang.String barcode_UCC_EAN_128(java.lang.String data)
The UCC/EAN-128 specification is an internationally recognized format for application identifiers in code 128 bar codes. The bar code symbology is identical to code 128. Only recognized bodies of the UCC or EAN may assign application identifiers. Character set: 256 ASCII via three Code Sets and an “extend” function.It prints an EAN-128 format barcode that is 10mm high and followed by human readable text. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_UPC_A

public java.lang.String barcode_UPC_A(java.lang.String data)
This method will print "UPC-A" barcode it should requires 12 digits. The first 11 will be printed and the 12th will be replaced by a check digit calculated by a printer. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_UPC_E

public java.lang.String barcode_UPC_E(java.lang.String data)
This method will print "UPC-E" barcode it should requires 7 digits. The first 6 will be printed and the 7th will be replaced by a check digit calculated by a printer. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_EAN_JAN_8

public java.lang.String barcode_EAN_JAN_8(java.lang.String data)
This method will print "EAN_JAN_8" barcode it should requires 8 digits. The first 7 will be printed and the 8th will be replaced by a check digit calculated by the printer. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_EAN_JAN_13

public java.lang.String barcode_EAN_JAN_13(java.lang.String data)
This method will print "EAN_JAN_13" barcode it should requires 13 digits. The first 12 will be printed and the 13th will be replaced by a check digit calculated by the printer. Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


barcode_Codabar

public java.lang.String barcode_Codabar(java.lang.String data)
This method will print "Codabar" barcode Character set: 0-9, $, -, :, /, ., + . Pass the return value to the "Call_Printer" method in the "com.analogics.AnalogicsPrinter" class to print


bell

public java.lang.String bell()
This method is to Causes the printer’s bell to sound


cancel

public java.lang.String cancel()
This method is to Deletes all data in the printer’s input buffer and resets the printer to power up default values.


print_Contrast

public java.lang.String print_Contrast(int n)
This method is to Contrast command can be used to increase or decrease print intensity. '0' corresponds to highest intensity and '9' corresponds to lowest. The speed of printing decreases when intensity is increased. Where n is 0 < n < 9


Reset

public java.lang.String Reset()
This method is to Deletes all data in the printer’s buffer and resets the printer to power up default values.


turn_Printer_Off

public java.lang.String turn_Printer_Off()
This method is to Causes the printer to turn itself off


prepare2InchImageData

public byte[] prepare2InchImageData(java.lang.String address,
                                    java.lang.String hexStr,
                                    int height)
This method is to prepare the data to print the image in 2 inch Bluetooth printer pass the return value to the method "Call_PrintertoPrint(String address, byte[] printdata)


Dynamic_ImagePrint

public java.util.List<java.lang.String> Dynamic_ImagePrint(java.lang.String imagepath)
This method is to print the image ,pass the retutn value to the "print2inchImage" or "print3inchImage" methods in class "com.analogics.AnalogicsPrinter" Note:- use "print2inchImage" method for 2 inch thermal bluetooth printers and "print3inchImage" method for 3 inch thermal bluetooth printers Permissions needed :::


getResizedBitmap

public static Bitmap getResizedBitmap(Bitmap bm,
                                      int newHeight,
                                      int newWidth)