Giter Club home page Giter Club logo

tspl2-driver's People

Contributors

bunkenburg avatar dependabot[bot] avatar koneru9999 avatar ncioj10 avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tspl2-driver's Issues

Error:(39, 42) java: cannot find symbol symbol: method properties()

Hello, I cannot find where is this function come from:

properties().getProperty("tsc.vendor.id")

please help, thanks

`package com.mycompany.app;

import org.fintrace.core.drivers.tspl.commands.device.Counter;
import org.fintrace.core.drivers.tspl.commands.device.CounterExpression;
import org.fintrace.core.drivers.tspl.commands.label.BarcodeAlignment;
import org.fintrace.core.drivers.tspl.commands.label.BarcodeRotation;
import org.fintrace.core.drivers.tspl.commands.label.DataMatrix;
import org.fintrace.core.drivers.tspl.commands.label.Text;
import org.fintrace.core.drivers.tspl.commands.label.TscLabel;
import org.fintrace.core.drivers.tspl.commands.system.ClearBuffer;
import org.fintrace.core.drivers.tspl.commands.system.Direction;
import org.fintrace.core.drivers.tspl.commands.system.Gap;
import org.fintrace.core.drivers.tspl.commands.system.Print;
import org.fintrace.core.drivers.tspl.commands.system.Size;

import lombok.extern.slf4j.Slf4j;
import org.fintrace.core.drivers.tspl.commands.status.TSPLStatusPollCommands;
import org.fintrace.core.drivers.tspl.connection.EthernetConnectionClient;
import org.fintrace.core.drivers.tspl.connection.USBConnectionClient;
import org.fintrace.core.drivers.tspl.connection.TSPLConnectionClient;
import org.fintrace.core.drivers.tspl.exceptions.ConnectionClientException;
import org.fintrace.core.drivers.tspl.listeners.ClientListener;
import org.fintrace.core.drivers.tspl.listeners.DataListener;

/**

  • Hello world!

*/
public class App
{
public static void main( String[] args )
{
// USB Client
TSPLConnectionClient tsplConnectionClient = new USBConnectionClient(
(short) Integer.parseInt(properties().getProperty("tsc.vendor.id"), 16),
(short) Integer.parseInt(properties().getProperty("tsc.product.id"), 16));

    tsplConnectionClient.init();

    tsplConnectionClient.connect();


    TscLabel tscLabel = TscLabel.builder()
            .element(Size.builder().labelWidth(4f).labelLength(3f).build())
            .element(Gap.builder().labelDistance(0f).labelOffsetDistance(0f).build())
            .element(Direction.builder().printPositionAsFeed(Boolean.TRUE).build())
            .element(ClearBuffer.builder().build())
            .element(DataMatrix.builder().xCoordinate(10).yCoordinate(110).width(400)
                    .height(400).content("DMATRIX EXAMPLE 1").build())
            .element(DataMatrix.builder().xCoordinate(310).yCoordinate(110).width(400)
                    .height(400).moduleSize(6).content("DMATRIX EXAMPLE 2").build())
            .element(DataMatrix.builder().xCoordinate(10).yCoordinate(310).width(400)
                    .height(400).moduleSize(8).nbRows(18).nbCols(18)
                    .content("DMATRIX EXAMPLE 3").build())
            .element(Print.builder().nbLabels(1).nbCopies(1).build())
            .build();



    tsplConnectionClient.send(tscLabel);

    tsplConnectionClient.disconnect();
    tsplConnectionClient.shutdown();

    System.out.print(tscLabel.getTsplCode());

}

}`

Need a little programm-example, how to use this driver.

Hi man! I realy need a little example of simple maven project, just for print this label:

TSPLLabel tsplLabel = TSPLLabel.builder()
.element(Size.builder().labelWidth(4f).labelLength(3f).build())
.element(Gap.builder().labelDistance(0f).labelOffsetDistance(0f).build())
.element(Direction.builder().printPositionAsFeed(Boolean.TRUE).build())
.element(ClearBuffer.builder().build())
.element(DataMatrix.builder().xCoordinate(10).yCoordinate(110).width(400)
.height(400).content("DMATRIX EXAMPLE 1").build())
.element(DataMatrix.builder().xCoordinate(310).yCoordinate(110).width(400)
.height(400).moduleSize(6).content("DMATRIX EXAMPLE 2").build())
.element(DataMatrix.builder().xCoordinate(10).yCoordinate(310).width(400)
.height(400).moduleSize(8).nbRows(18).nbCols(18)
.content("DMATRIX EXAMPLE 3").build())
.element(Print.builder().nbLabels(1).nbCopies(1).build())
.build();

I have spend much time, but my TSC tspl2 printer do not print this at all.
Create please simple console program to print this your example.
Thanks!

Barcode Rotation

Hi, Barcode is not working.

ShoulD be with rotation 0 but is setting STRING (no_rotation)
BARCODE 380,220, "128",100,0,NO_ROTATION,1,1,0,"123456"
Or null if rotation is not set:
BARCODE 38,220, "128",50,0,null,2,2,1,"LEFT"

USB Connection

When i want to connect USB device it says;

SWT SessionManagerDBus: Failed to connect to org.gnome.SessionManager: Ba\u011flant\u0131 kapal\u0131
SWT SessionManagerDBus: Failed to connect to org.xfce.SessionManager: Ba\u011flant\u0131 kapal\u0131
[main] INFO org.fintrace.core.drivers.tspl.connection.USBConnectionClient - USB Service Implementation: usb4java
[main] INFO org.fintrace.core.drivers.tspl.connection.USBConnectionClient - Implementation version: 1.2.0
[main] INFO org.fintrace.core.drivers.tspl.connection.USBConnectionClient - Service API version: 1.0.2
[main] INFO org.fintrace.core.drivers.tspl.connection.USBConnectionClient - Interface Direction: 0, Interface Address: 2
[main] INFO org.fintrace.core.drivers.tspl.connection.USBConnectionClient - Interface Direction: -128, Interface Address: -126

My Code is;

TSPLConnectionClient tsplConnectionClient = new USBConnectionClient((short)0x20d1,(short)0x7008 );
tsplConnectionClient.init();
tsplConnectionClient.connect();

My usb-devices list

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=20d1 ProdID=7008 Rev=01.00
S:  Manufacturer=HPRT
S:  Product=LPQ58
S:  SerialNumber=LPQ58017220173
C:  #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=10mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=(none)

Please help. Thanks a lot.


java.lang.NoClassDefFoundError: org/fintrace/core/drivers/tspl/commands/TSPLCommand

Hello, here is my main class. I can build the package but when I run I got the error. thanks

package com.mycompany.app;

import org.fintrace.core.drivers.tspl.commands.device.Counter;
import org.fintrace.core.drivers.tspl.commands.device.CounterExpression;
import org.fintrace.core.drivers.tspl.commands.label.BarcodeAlignment;
import org.fintrace.core.drivers.tspl.commands.label.BarcodeRotation;
import org.fintrace.core.drivers.tspl.commands.label.DataMatrix;
import org.fintrace.core.drivers.tspl.commands.label.Text;
import org.fintrace.core.drivers.tspl.commands.label.TscLabel;
import org.fintrace.core.drivers.tspl.commands.system.ClearBuffer;
import org.fintrace.core.drivers.tspl.commands.system.Direction;
import org.fintrace.core.drivers.tspl.commands.system.Gap;
import org.fintrace.core.drivers.tspl.commands.system.Print;
import org.fintrace.core.drivers.tspl.commands.system.Size;

public class App
{
public static void main( String[] args )
{
// USB Client
//TSPLConnectionClient tsplConnectionClient = new USBConnectionClient(
//(short) Integer.parseInt(properties().getProperty("tsc.vendor.id"), 16),
//(short) Integer.parseInt(properties().getProperty("tsc.product.id"), 16));

    //tsplConnectionClient.init();

    //tsplConnectionClient.connect();

    TscLabel tscLabel = TscLabel.builder()
            .element(Size.builder().labelWidth(4f).labelLength(3f).build())
            .element(Gap.builder().labelDistance(0f).labelOffsetDistance(0f).build())
            .element(Direction.builder().printPositionAsFeed(Boolean.TRUE).build())
            .element(ClearBuffer.builder().build())
            .element(DataMatrix.builder().xCoordinate(10).yCoordinate(110).width(400)
                    .height(400).content("DMATRIX EXAMPLE 1").build())
            .element(DataMatrix.builder().xCoordinate(310).yCoordinate(110).width(400)
                    .height(400).moduleSize(6).content("DMATRIX EXAMPLE 2").build())
            .element(DataMatrix.builder().xCoordinate(10).yCoordinate(310).width(400)
                    .height(400).moduleSize(8).nbRows(18).nbCols(18)
                    .content("DMATRIX EXAMPLE 3").build())
            .element(Print.builder().nbLabels(1).nbCopies(1).build())
            .build();

    System.out.println(tscLabel);

    //tsplConnectionClient.send(tscLabel);

    //tsplConnectionClient.disconnect();
    //tsplConnectionClient.shutdown();
}

}

No information is being read from the USB printer on Linux

I can print labels, but I could not query the situation.

TSPLConnectionClient tsplConnectionClient = new USBConnectionClient((short) 4611);
tsplConnectionClient.addDataListener(new DataListener() {..}
tsplConnectionClient.init();
tsplConnectionClient.connect();
tsplConnectionClient.send(TSPLStatusPollCommands.STATUS.getCommand() + LF);

The printer device has been authorized. MODE="0666"
What I'm doing wrong?

How connect to usb printer on windows?

When I'm trying connect to the usb label printer HPRT LPQ58, have an error in method connect().
TSPLConnectionClient tsplConnectionClient = new USBConnectionClient((short)8401, (short)28680); tsplConnectionClient.init(); tsplConnectionClient.connect();

java.lang.NullPointerException at org.fintrace.core.drivers.tspl.connection.USBConnectionClient.getWritePipe(USBConnectionClient.java:311) at org.fintrace.core.drivers.tspl.connection.USBConnectionClient.connect(USBConnectionClient.java:108)
Zadig is not helping.
What I'm doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.