Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Simanto Rahman
    @Simanto_Rahman_twitter
    This is where the error is thrown. Maybe anyone from the maintainers can help.
    Simanto Rahman
    @Simanto_Rahman_twitter
    Seems if i feed the printer object returned from getPrinters from node-printer and feed it as interface, it works
    Simanto Rahman
    @Simanto_Rahman_twitter
    I came to the conclusion: the version I was using was not providing the functionalities like execute() which is odd for me honestly. The printer is fine but it doesn't have the properties that it expects from node-printer
    Simanto Rahman
    @Simanto_Rahman_twitter
    I've been talking in node-printer gitter chat as well. Seems there might be a solution afterall.
    Simanto Rahman
    @Simanto_Rahman_twitter

    So I wanna document my process to run node-thermal-printer:
    MacOS: 10.15.2
    Node: 12.8.1
    Electron: 7.1.9
    node-thermal-printer: From pull request #135
    node-printer: https://github.com/thiagoelg/node-printer (you can clone it and change name to 'printer' to replace node-printer)
    electron-rebuild: 1.8.8

    Once all the packages are added via npm, run ./node_modules/.bin/electron-rebuild to rebuild all native modules for your current electron version. That should do the trick. I also have sqlite3 and fsevents as my native modules. All gets compiled alright and runs pretty nicely.

    Vladislav
    @naumovld
    Hi guys , try to work with node-thermal-printer with electron and macOS , and got error /node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:159 Error: No driver set!

    my code const ThermalPrinter = require("node-thermal-printer").printer;
    const PrinterTypes = require("node-thermal-printer").types;
    const prr = require("printer");
    const electron =
    typeof process !== "undefined" &&
    process.versions &&
    !!process.versions.electron;

    let printer = new ThermalPrinter({
    type: PrinterTypes.EPSON,
    interface: "printer:My Printer",
    driver: prr
    });

    anyone know what is problem? thx
    Simanto Rahman
    @Simanto_Rahman_twitter
    @naumovld #135 is the solution to it. The contributors haven't accepted the PR, probably just waiting to get some free time to do it. I pulled that PR and works fine. Look at my previous message, it outlines the exact process to make it work on Electron 7.1.9 (tested on MacOS 10.15.2)
    Simanto Rahman
    @Simanto_Rahman_twitter
    Oh #135 was merged
    Jack
    @JimFrostig
    hej guys, i want to setup the thermal printer to show it as virtual printer and write a file. did anyone now how to configure that ?
    Simanto Rahman
    @Simanto_Rahman_twitter
    That would not fall under node-thermal-printer’s domain i believe
    Cattpot
    @Cattpot
    hello, anybody working with ah Xprinter from china?
    cant get rid of the chinese characters
    Simanto Rahman
    @Simanto_Rahman_twitter
    If you provide the model and make, maybe we can find a manual on command codes
    Cattpot
    @Cattpot
    @Simanto_Rahman_twitter its a XP-N160II
    xp.jpg
    i tried many code pages..
    Cattpot
    @Cattpot
    maybe its a problem with the "Resident Character"
    every time i write a umlaut like äöü i get a chinese symbol
    AloneSpace
    @AloneSpace
    How to fix this ? => Error: 'code128' not implemented yet
    NiranjanSubramanyam
    @NiranjanSubramanyam
    Hi All - I was able to print to a thermal printer from an Angular App which communicates with the node-thermal-printer package via a node utility configured as a windows service. It works great and prints everything as expected. However, i am not able to print the QR with this package. For testing, I have taken the code from the github and replaced it in my node app. It prints all except the QR. Please help me or guide me on how to get the QR printed.
    i am using a "HOP-E300 80mm Portable Thermal Printer" which supports QR code printing.
    jurgen11
    @jurgen11
    hello, when i try this return true:

    const ThermalPrinter = require("./node_modules/node-thermal-printer").printer;
    const Types = require("./node_modules/node-thermal-printer").types;

    async function testConnection () {
    let printer = new ThermalPrinter({
    type: Types.EPSON,
    interface: 'my interface'
    });

    let isConnected = await printer.isPrinterConnected();
    console.log("Printer connected:", isConnected);

    }

    testConnection();

    dont print nothing
    But if i try to print it dosn't print. I am using a EPSON TM-T20III
    Siriwat K.
    @stylixboom
    image.png
    Hi, I have problem with the printing output, what should I do with this.
    The problem appears with the node-thermal-printer, but not with the standard EPSON print tester app
    Roberto Wesley Overdijk
    @RWOverdijk
    I am trying to use node-thermal-printer in electron but I'm getting "Net.connect is not a function".
    Simanto Rahman
    @Simanto_Rahman_twitter
    @NiranjanSubramanyam if you know the command code for executing the QR code printing, that might be a temporary solution for now.
    4 replies
    Muhammed Haris MP
    @GreenArrowVigilante
    const ThermalPrinter = require("node-thermal-printer").printer is undefined
    ThermalPrinter is undefined
    Stephanie
    @stephyswe
    hello
    We got a React App. but is it possible to call a function inside React that triggers node-thermal-printer node wise ?
    Mingjing
    @pholmesp_gitlab
    @stephyswe There is no other way except creating a restful API with node and then call that API from your react app to print.
    YKW97
    @YKW97
    Hi all, how can I center printImage?
    Munkhbat Banzragch
    @munkhbatphoto_gitlab
    how electron-pos-printer table array data for loop
    Juan José
    @juancasz
    I'm trying to use this package on windows. I'm connecting to the printer through an USB port. What should I put here on the interface?
    let printer = new ThermalPrinter({
    type: PrinterTypes.STAR, // Printer type: 'star' or 'epson'
    interface: 'something goes here', // Printer interface
    characterSet: 'SLOVENIA', // Printer character set - default: SLOVENIA
    removeSpecialCharacters: false, // Removes special characters - default: false
    lineCharacter: "=", // Set character for lines - default: "-"
    options:{ // Additional options
    timeout: 5000 // Connection timeout (ms) [applicable only for network printers] - default: 3000
    }
    });
    RahulMongia
    @RahulMongia
    @juancasz did you find out the interface for USB printer.
    RahulMongia
    @RahulMongia
    did anyone find out the interface and driver set for the USB printer?
    Stephanie
    @stephyswe
    Hi, im getting Star.beep
    default printer name: Star TSP100 Cutter (TSP143)
    Error: 'beep' not implemented yet

    const ThermalPrinter = require("node-thermal-printer").printer;
    const PrinterTypes = require("node-thermal-printer").types;
    const printer = require("printer");
    const electron = typeof process !== 'undefined' && process.versions && !!process.versions.electron;

    console.log('default printer name: ' + (printer.getDefaultPrinterName() || 'is not defined on your computer'));

    let print = new ThermalPrinter({
    type: PrinterTypes.STAR,
    interface: 'printer:Star TSP100 Cutter (TSP143)',
    characterSet: 'SLOVENIA',
    removeSpecialCharacters: false,
    driver: require(electron ? 'electron-printer' : 'printer'),
    options:{
    timeout: 5000
    }
    });

    async function printing() {
    let isConnected = await print.isPrinterConnected();
    let execute = await print.execute();
    let raw = await print.raw(Buffer.from("Hello world"));
    print.print("Hello World");
    print.println("Hello World");
    print.cut();
    print.partialCut();
    print.beep();
    print.upsideDown(true);
    print.setCharacterSet("SLOVENIA");

    }

    printing();

                       // Set printer drive - default set on init
    Nate Wilson
    @natekwilson
    Hello, I'm very interested in this package. I'm trying to connect to a shared USB printer from a Windows host which if I understand correctly is done via SMB on port 445 or 137. So I should attempt to connect via interface 'tcp://10.100.1.47:445' this returns a "Printer connected: true" and doesn't error, but my tm-t20iii printer and it's logs are untouched. Is what I'm attempting possible? I've opened up the firewall on those ports and to all scopes.
    Nate Wilson
    @natekwilson
    1 reply
    Sharan
    @shartrooper
    Greetings. This npm package also is able to control EPSON/STAR thermal label printers for shipping packages?. Also Rongta
    Dinesh Kumar
    @DineshShazam

    Hi I have an Epson thermal printer, It's a USB printer, I am using node js as backend in my application,I want to integrate this pckg and use to print receipt in my application,

    I saw your package and you have mentioned only how to connect with tcp connection printer , not with USB connection printer ,

    please please help me on this

    Imam Ali Mustofa
    @darkterminal

    Hi i have epson thermal printer with Electron 16.0.4 this library work well on linux with lp0 usb but not working on windows 7

    let printer = new ThermalPrinter({
            type: PrinterTypes.EPSON,                                  // Printer type: 'star' or 'epson'
            interface: process.platform === 'linux' ? '/dev/usb/lp0' : 'printer:' + data.printer_name,
            options: {                                                 // Additional options
                timeout: 5000                                           // Connection timeout (ms) [applicable only for network printers] - default: 3000
            }
        })

    it's wrap inside function....