JavaPOS Configuration Tool

1 Introduction

  JavaPOS configuration tool is used to configure printer and cash drawer component. The functions are enabled via visiting and modifying the XML File.

2 Functions

 The application consists of 3 tabbed panes: “Printer(s)”, “Cash Drawer(s)” and “About”. The About tab provides version information for the configuration program and the JavaPOS.

3 Configuration tool installation

  JavaPOS software package installation includes this tool program.

4 Configuration tool usage

4.1 Running  

  In windows, in start menu\program\JavaPOS, you can select the configuration tool (JavaPOS\JavaPOS_Configure.bat), and run it:

  In linux, in the folder installed the JavaPOS, you can select the configuration tool (JavaPOS\JavaPOS_Configure.sh), and run it:

  

(1)In order to make user configure device easily, a configuration tool is provides for
user to configure device by calling
JavaPOS_Configure.bat file, and copy the content produced in
the file into configuration file existed (jpos.xml) or use the file as your configuration
file.

(2)If configure file doesn't be created before installing JavaPOS software package.
under "jdk1.7.0" platform, users only need to copy "jpos.xml" file into the directory
"jdk1.7.0\jre\lib\ext". Then "jpos114.jar" will orient in the file automatically.
If it can't orient the file, firstly pls uncompress jpos114.jar file. secondly edit
"jpos.properties" file in the directory  "jpos\res". Thirdly pls find and define the
attributes of  "jpos.config.populatorFile"
according to the below format:
jpos.config.populatorFile=D\:\\Program Files\\JavaPOS\\SetupPOS\\jpos.xml

(3)Pls note the "jpos.config.populatorFile" value need to be modified to your own directory
plus file name.
Then please repackage using command below:
jar -cvf jpos114.jar jpos

4.2 Printer Tab

  Here is a sample screen shot of the printer tab:

   

4.2.1 Configure Section

The following settings are available in the “Configure” section:

Device Name Click on the down arrow to show a list of the configured device names.

If you select a device name that refers to an printer, then you may view and update its settings, or run the service object’s interactive health check test.

If you select a device name that refers to another vendor’s printer, then you may only test it.

New... Click this button to add a new device name. A simple dialog will prompt for the name.

Delete... Click this button to delete the selected device name. A message box will ensure that you want to delete it before taking action.

4.2.2 Special Setting Section

There are some special settings as following in the “Special Setting” section when you click "Special Setting" Button.  

  

Then it will pop up a dialog as following:

The first Dialog is shown as following:

   

"Bitamp Printing in PTR_BM_ASIS " ComboBox:

When you select "one bitmap pixel per printer dot", if you use PrintBitmap or SetBitmap in PTR_BM_ASIS, then the bitmap file will be printed in normal size.

When you select "two bitmap pixel per printer dot", if you use PrintBitmap or SetBitmap in PTR_BM_ASIS, then the bitmap file will be printed in double-height-double-width size.

"Default RecLetterQuality" ComboBox:

When you select "false", then the RecLetterQuality property will be set false in open method, and the bitmap will be print fast.

When you select "true", then the RecLetterQuality property will be set true in open method, and the bitmap will be print smoothly.

"Method" ComboBox, Contrast SliderCtrl, Brightness SliderCtrl,Threshold SliderCtrl:

They are uesd to change the color bitmaps which will be printing to binary format bitmaps, you can select a different value to change the format of bitmap.

For example: The "Before Coversion" is the source bitmap file, and the "After Coversion" is the dest bitmap file by translating.

   

If you click "Next" Button, the another Dialog will be pop up as following:

The second Dialog is "Cut Paper Standard" "Code128 Barcode Default Code Set" "NOT_EMPTY Add Into Event Log" "Frequency Of Tallies" "PaperWidth" "RecLineChars" "RecLineSpacing".

When you select "all in partial cut", if you use CutPaper or "Paper cut", "Feed and Paper cut", "Feed, Paper cut, and Stamp" Escape Sequences, then the printer will cut paper in partial cut mode.

When you select "cut according to UPOS Specification", if you use CutPaper or "Paper cut", "Feed and Paper cut", "Feed, Paper cut, and Stamp" Escape Sequences, then the printer will cut paper according to UPOS Specification.

When you select "all in full cut", if you use CutPaper or "Paper cut", "Feed and Paper cut", "Feed, Paper cut, and Stamp" Escape Sequences, then the printer will cut paper in full cut mode.

If you click "Next" Button, the another Dialog will be pop up as following:

The third Dialog is "LeftMargin" "RightMargin" "CharacterSet[CodePage Number]" "Barcode Width".

And you can select a special LeftMargin RightMargin and CharacterSet in Combobox. LeftMargin only set the character left margin, don't set the barcode and bitmap left margin. RightMargin only set the character right margin, don't set the barcode and bitmap right margin. The leftMargin and rightMargin of barcode and bitmap are consistent with the printer actual configuration.

The "Barcode Width" only set the width of Code128. When "Barcode With" set to 0, barcode printing width is the width parameter in printBarcode interface; otherwise, barcode printing width is the value of "Barcode Width".

And you must do Special Setting.

4.2.3 Device Settings Section

The following settings are available in the “Device Settings” section:

Printer Model Click on the down arrow to show a list of the valid printer models. Change the model by selecting the appropriate one from the list.

Interface Type Click on the down arrow to show a list of the available interfaces for the selected printer model. Change the interface by selecting the appropriate one from the list.

Save Click this button to save the changes that you have made. (The button will be disabled unless unsaved changes are pending.)

Exit Click this button to exit the program. If any unsaved changes are pending, you will be alerted by a message box before exiting.

Communications Click this button to view or change the communications settings for the selected interface. Here are example screen shots for the interfaces:

Select "RS232" in the "Interface Type" Combo Box, then you can change the RS232 Interface Settings.

In this dialogue box, the parameter of serial port can be set. The self-test page is printed to show the current printer serial parameter (Please refer to "Print self-test page ").

Select "USB" in the "Interface Type" Combo Box, then you can change the USB Interface Settings.

Select "Ethernet" in the "Interface Type" Combo Box, then you can change the Ethernet Interface Settings.

Tracing Click the "Tracing..." button to view or change the trace settings for the selected device. Here is an example screen shot:

4.3 Cash Drawer Tab

4.3.1 Configure Section

The following settings are available in the “Configure” section:

Device Name Click on the down arrow to show a list of the configured device names.

If you select a device name that refers to an cash drawer, then you may view and update its settings, or run the service object’s interactive health check test.

If you select a device name that refers to another vendor’s cash drawer, then you may only test it.

New... Click this button to add a new device name. A simple dialog will prompt for the name.

Modify...Click this button to modify the selected device name.

Delete... Click this button to delete the selected device name. A message box will ensure that you want to delete it before taking action.

4.3.2 Device Settings Section

The following settings are available in the “Device Settings” section:

Uses Printer A drawer must be associated with a configured printer; the printer configuration determines the model, interface, and tracing settings. Click on the down arrow to show a list of the configured printer device names. Change the associated

 printer by selecting the appropriate one from the list.

Drawer Click on the down arrow to show a list of the available drawer numbers – 1 and 2. Change the drawer number by selecting the appropriate one from the list.

Save Click this button to save the changes that you have made. (The button will be disabled unless unsaved changes are pending.)

Exit Click this button to exit the program. If any unsaved changes are pending, you will be alerted by a message box before exiting.

4.4 2ST config  

Then, you can config the 2ST function.

Step 1: Config the 2ST main function, and you should check the "TwoSides Setting" button then a windows as below will be appear:

Step 2: You can select "Print Mode" as below:

  Note: four print modes:

The two-sided thermal print station has four modes of operation:

1) Single Sided Mode :The printer only prints on the front side of the paper.
2) Double Sided Mode with Single Side Command (Split Receipt) :Normal print operations are buffered at the printer, executed and split between front and back side when a knife cut is encountered.
3) Double Sided Mode with Double Side Command (Full Control) :The side desired to print on is selected, and the data to print are sent to it. After the data for both sides are defined, a begin print, or knife cut command is issued to print the two-sided receipt.
4) Double Sided Mode with Predefined Data (Static Reverse Image) :Data to print is sent to the printer. A predefined image is selected from previously-defined images. When a print command or knife cut is received, the data is printed on the front side, and the predefined image selected is printed on the back.

Single sided: default mode, When this setting is selected, the JavaPOS Service sets the printer to this mode at Claim time. None of the other two-sided configuration options is processed. Any two-sided proprietary escape sequences are ignored, except for the escape sequence that switches modes. In this mode, the printer functions the same as all previous thermal receipt printers. 

Once a two-sided mode is entered, the application can ONLY print using the JavaPOS transactionPrint method. The reason for this restriction is due to error-handling. Because the printer has to buffer all data before printing, there is no way to determine errors on a line level. Due to this buffering, errors can only be recovered at a transaction level. Therefore we enforce the use of transaction printing only while in a two-sided mode.

two-sided mode as below:

Split receipt: Double Sided Mode with Single Side Command,  When this mode of operation is selected, the printer buffers all print commands sent to it until a paper cut command is issued. At that time, it splits the receipt and prints it between the front and back. All of the two-sided escape sequences and settings are valid except for those that deal with a predefined back side image, or selecting a specific print side.

Full control: Double Sided Mode with Double Side Command, This mode of operation is the one that gives the application the most flexibility in two-sided printing. It allows the application to define and print anything they want on both sides of the paper dynamically. See Select Print Side Sequences under Data Characters and Escape Sequences for special ESC sequence only available in this mode.

Static reverse side image: Double Sided Mode with Predefined Data, As with all of the TST2SideMode settings, this mode is initiated at Claim time, or with the select mode escape sequence. At Claim time, the Service Object loads the predefined image file from the configuration setting of "Image 1 Setting" and enables the two-sided mode. If this mode is selected but the TSTPreDefinedImage1 is not populated, then it will remain the default image in the printer. All of the two-sided escape sequences are valid for this mode of operation except for the "Select Print Side" sequence. The ESC[2ST;3;n!v[directory / filename] activates the predefined back side image and can be used to change the image that is being used for the back side of the paper. If this sequence is sent with n = 0 but no [directory / filename] parameter, it is assumed that the user wants to erase the existing predefined image and clears it. The above sequence is ONLY VALID after a knife cut, and before any other print operation is sent to the printer. If any other print operation is sent to the printer before this sequence, then it is ignored. See Data Characters and Escape Sequences for more information about escape sequences that control the two-sided functionality. Now this mode can only select one image.

Step 3: If you select 2ST mode (such as "Split receipt", "Full control" and "Static reverse side image"), you can select "Print Sides", "Paper Type Detection" and "Orientation" function:

Step 4: Print Sides setting:

 Front and back normal: Front side faces toward front of the printer.

 Front and back swapped: Front side faces away from the front of the printer.

Step 5: Paper Type Detection setting:

 Disabled: don't check if you use a 2ST paper.

 Enabled: check if you use a 2ST paper, when you don't use a 2ST paper, then the StatusUpdateEvent will be fired with the 92 status code. IF you change to a 2ST paper, then the StatusUpdateEvent will be fired with the 91 status code.

Step 6: Orientation:

 Front normal, Back normal: Default orientation.

 Front normal, Back upside down: The back side will reverse 180 degree.

 Front upside down, Back normal: The front side will reverse 180 degree.

 Front upside down, Back upside down:  The front side and back side will reverse 180 degree all.

Step 7: If you select "Split receipt" mode, then you can set "Split Mode Minimum Receipt Length". If you don't set, it will split the 2ST receipt default. If you set, the length of front side of the 2ST receipt will be the same with your setting.

  Note: The maximum of the length is 321 inch.

Step 8: Auto Cut Setting

If you select "Split receipt" mode or "Static reverse side image" mode, then you can set "Auto Cut Setting".

Enabled: JavaPOS Service Object issues a knife cut when the TransactionPrint method is called with a control parameter of PTR_TP_NORMAL .

Disabled: No cut is performed and nothing is printed when TransactionPrint method is called with a control parameter of PTR_TP_NORMAL .

Step 9: Image 1 Setting Redownload

The JavaPOS Service downloads a image data to FLASH at enable time.

You can select a "TSTPreDefinedImage" number and click "Browse..." button to select a mage data file which will be downloaded to FLASH.

You can also select more than one  image data at a time, and you just need to select more than one "TSTPreDefinedImage" number and click "Browse..." button.

If you want to clear them, you need to select them and click "Clear..." button.

Step 10: Config the 2ST predefined Bottom Front message function, and you should click the "Next" Button:

Step 11: Enable Predefined Bottom Front message:

Disabled: the Bottom Front message will be forbidden.

Enabled: the Bottom Front message will be fired.

Step 12: If you enable Predefined Bottom Front message, you can set the Bottom Front Lion one message and Bottom Front Lion two message text Attribute, for example, you can set the Bottom Front Lion one message text double height and double wide, and set the Bottom Front Lion two message text normal.

Step 13: Config the 2ST predefined Top Back message function, and you should click the "Next" Button:

Step 14: Enable Predefined Top Back message:

Disabled: the Top Back message will be forbidden.

Enabled: the Top Back message will be fired.

Step 15: If you enable Predefined Top Back message, you can set the Top Back Lion one message and Top Back Lion two message text Attribute, for example, you can set the Top Back Lion one message text Emphasize Mode and 1 Dot UnderLine, and set the Top Back Lion two message text Inverse Video and Italic.

Step 16: Config the 2ST predefined Error Reprint message function, and you should check the click the "Next" Button:

Step 17: Enable Reprint after error:

Disabled: the JavaPOS Service can't reprint the previous error receipt.

Enabled: the JavaPOS Service reprint the previous error receipt.

Step 18: Enable Predefined Error Reprint message:

Disabled: the Error Reprint message will be forbidden.

Enabled: the Error Reprint message will be fired.

Step 19: If you enable Predefined Error Reprint message, you can set the Error Reprint Lion one message and Error Reprint Lion two message text Attribute, for example, you can set the Top Error Reprint one message text 2 Dot UnderLine, and set the Top Back Lion two message text Italic.

Step 20:  check the click the "OK" Button to finish your configuration.

5 CheckHealth Test

In start menu\program\JavaPOS, you can select the configuration tool (JavaPOS\JavaPOS_CheckHealth.bat), and run it:

Click the "CheckHealth" button to create an JavaPOS POSPrinter instance, open, claim, and enable it, then call its CheckHealth API for the interactive health check. The JavaPOS health check dialog will look similar to the following:



6 Uninstall

  In start menu\program\JavaPOS you can select uninstall JavaPOS software (JavaPOS\Change JavaPOS Installation), and click "Uninstall Product" to start the uninstall according to the prompt.