-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STAR TSP100 #235
Comments
Hi @jayel74 try adding port to your netowrk string. For example "tcp://192.168.18.118:9100" |
Hey @Klemen1337, i've added 9100, but no go.
async function testConnection() {
const printer = new ThermalPrinter({
type: PrinterTypes.STAR,
interface: "tcp://192.168.18.118:9100",
});
printer.alignCenter();
printer.println("Hello world");
//await printer.printImage('./assets/olaii-logo-black.png')
printer.cut();
try {
let execute = printer.execute()
console.log("Print done!");
} catch (error) {
console.error("Print failed:", error);
}
} |
Can you add let execute = await printer.execute() |
async function testConnection() {
const printer = new ThermalPrinter({
type: PrinterTypes.STAR,
interface: "tcp://192.168.18.118:9100",
});
printer.alignCenter();
printer.println("Hello world");
//await printer.printImage('./assets/olaii-logo-black.png')
printer.cut();
try {
let execute = await printer.execute()
console.log("Print done!");
} catch (error) {
console.error("Print failed:", error);
}
}
testConnection();
|
hello, No update on the above? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
Great library, but we cannot seem to print anything to a TSP 100 STAR printer.
Is does say the data is sended to the printer, but nothing is printed.
PS D:\development\node\testposprinter> node index.js Print done! Data sent to printer: 192.168.18.118:9100 <Buffer 1b 74 12 1b 61 01 48 65 6c 6c 6f 20 77 6f 72 6c 64 0a 1b 64 04 1b 64 04 1d 56 00 1b 40> PS D:\development\node\testposprinter> node index.js Print done! Data sent to printer: 192.168.18.118:9100 <Buffer 1b 74 12 1b 1d 61 01 48 65 6c 6c 6f 20 77 6f 72 6c 64 0a 0b 0b 1b 64 02 1b 40>
Any pointers?
greets
John
The text was updated successfully, but these errors were encountered: