Integrating Bartender And Tsc Printer With A Java Application
I have a Swing application. I want to produce barcode labels from the application (using barcode4j to get barcodes) and fire print to the TSC printer. Is there a way to do this. When I print the component using a normal printer, it prints just fine but not on the TSC printer. Can someone help me as to how to go about this please.
Thanks a lot
Thanks a lot
BarTender’s support for ActiveX Automation allows users to use Java with code that that instructs BarTender to automatically perform barcode label printing. You can reference
ActiveX reference: http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_BarTendersActiveXAutomationInterface.pdf
Java implementation with Bartender reference:
TSC Seagull printer driver download to work with Bartender for the optium performance.
For Barcode4j software print barcode in Java, you might need to check with their software support
You can download Bartender http://www.seagullscientific.com/aspx/free-bar-code-label-printing-software-download.aspx for a try
There was a mistake in my process....
There is no need to print image on the barcode labels....
since the resolution of my thermal printer is 203 dpi...the images will not come properly...
Now, I used the Software CD that came with my thermal printer to create a customized label with Header, footer and the barcode...
Then I crated the PRN file by checking 'print to file' option....
After that I used the PRN file as a template and wrote code for creating prn file using my java application....
I created a separate class for this purpose . In this I used a StringBuilder variable and stored the contents of the PRN file...and used String variables for label and text fields....
Then I used the command COPY /B <prn-file path> <printer network path> to print the labels...
This command is working fine from command prompt....
But I'm having problems in executing the same command with RunTime.getRunTime.exec() method...
java.io.IOException: Cannot run program "COPY": CreateProcess error=2, The system cannot find the file specified
I'm still finding a solution to run this command using java....0