Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    MBarrios
    @MBarrios

    Sorry.

    Currently node-printer works perfectly for me.

    But I need to print on a remote printer, isolating some TCP / IP protocol and port.

    so that the client using the web system can print a printer other than the sea that belongs to them. Is this possible?

    Simanto Rahman
    @Simanto_Rahman_twitter
    This uses some native functionalities of CUPS to send buffers and what not.
    I'd say, this would be a better usecase.
    https://www.npmjs.com/package/ipp
    Austin
    @austtn
    An unhandled error occurred inside electron-rebuild
    Unable to find electron's version number, either install it or specify an explicit version
    when i run electron-rebuild
    Simanto Rahman
    @Simanto_Rahman_twitter
    Which version of electron and node are you on?
    Austin
    @austtn
    current node just updated and idk what electron version or if i even have it installed
    where do i install electron
    Simanto Rahman
    @Simanto_Rahman_twitter
    Ok let's go over how far you've gone through setting up
    How did you start off the project?
    richardritech
    @richardritech
    Anyone can tells me if this library runs in latest version of electron and how can i install it? There is a erro telling me that the version compiled of node is not the version required and when i run electron-rebuild or node-gyp there is a error in the rebuild too
    Simanto Rahman
    @Simanto_Rahman_twitter
    I believe this should be documented.
    @richardritech for the node module to work on your version of electron, you need ‘node-gyp’ and ‘electron-rebuild’. Read the usage on electron rebuild. It will rebuild node-printer for the correct version of nodejs.
    Vinícius Montanheiro
    @vmontanheiro
    Hello guys, just a question, is it possible to choose the pages for printing? Something like pageFrom and pageTo?
    Vinícius Montanheiro
    @vmontanheiro
    Hello guys, just a question, is it possible to choose the pages for printing? Something like pageFrom and pageTo?
    vijayabalansujan
    @vijayabalansujan
    i need help for thermal printer
    need a example code for epson thermal printer in windows plateform.pls guys urgent.
    Cloud Han Xiao
    @cloudhx
    Dear all, I'm new to node-printer and want to use it in electron 7.1.13 with node 12.16.3, need help on how to install the package and build it, I simply cannot install it correctly. Thank you!
    Cloud Han Xiao
    @cloudhx
    I can install fork thiagoelg/node-printer successfully and it works well with Electron 7.1.13 and node 12.16.3, thanks.
    Vladimir Ruzic
    @ruzpuz

    Hi all. I just started a project using electron 9.0.0 and when trying to use this module it fails with

    Error: The module '/Users/vladar/workspace/project/node_modules/printer/lib/node_printer.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 80. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).

    I switched to thiagoelg/node-printer and it does not work either... Is there any way to solve this?
    Simanto Rahman
    @Simanto_Rahman_twitter
    Did you try electron-builder?
    Thiago Lugli
    @thiagoelg
    I've updated my fork to support Node 14 and Electron 9, feel free to check it out
    I've also opened a PR to merge these changes to Tojocky original source(tojocky/node-printer#295)
    sayam
    @sayamssanghvi
    hi all I wanted to use the module for printing some stuff can i directly run it as a file
    like make app.js and app.js calls all the other functions in a certain manner
    will it work
    ?
    Kirill
    @Microsxema
    Hello! It is working in node v13?
    (not electron)
    Kirill
    @Microsxema
    I have a error - "The specified module could not be found."
    Felipe Gustavo
    @felipe-gustavo
    Hi everybody, someone can help me make this works in my computer?
    image.png
    image.png
    I no have idea what i can do to fix this
    GabrielHumus
    @GabrielHumus
    I've got a Windows solution for all of you guys. Initially, I was trying to use a node printer to print PDF files, but I kept bumping into so many issues. Eventually, I realized that you can print PDFs from the command line using some programs, sumtra PDF and ghostscript + gsprint.
    I packed it into an electron application and released it here cheap photo printer reviews as I use it for my company.
    richardritech
    @richardritech
    Well i solved my problem by creating a c++ dll on windows for 32 bit only and using N-Api to integrate the c++ dll with node. Never happend a bug 100% working. Best idea ever.
    afif-bouzid
    @afif-bouzid
    @richardritech thank you my friend !! I already use ffi-napi and I hadn't thought of that. thank you you are a genius
    alanddos
    @alanddos

    Thanks to share, i'm cant make this lib run whith type pdf just print especial chars or give me the messageStartDocPrinterW error: code: 1804, message: O tipo de dado especificado é inválido.

    Im using this:

    var fs = require("fs");
    print.printDirect({
    data: fs.readFileSync(filename),
    type: 'PDF',
    printer: printerName, ....

    alanddos
    @alanddos
    Im use the https://github.com/artiebits/pdf-to-printer solve to me thanks man
    Geelus
    @geelus
    Hey guys, I'm trying to use this library but I'm getting an error on Mac. It works great on Windows through. The error says "No such file or directory".

    here is my code:
    var printer3 = require("@thiagoelg/node-printer");

    printer3.printDirect({data:'text messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext messagetext message'
    , printer:'192.168.1.40'
    , type: "RAW"
    , success:function(){
    console.log("printed: ");
    }
    , error:function(err){console.log(err);}
    });

    return;

    I really appreciate your help or anything that can lead to an answer.
    Geelus
    @geelus
    Can I pay you guys to help me?
    José GC
    @josegoyo
    hi
    nic seltzer
    @nicseltzer

    OS: Windows 10 // Node.js version: 14.17.5 // Electron version: 3.1.9

    As administrator, run npm install --global windows-build-tools. This installs a handful of libraries and dependencies
    needed to properly build the native code we will be compiling.

    npm install printer -- Pretty straight forward. It should go out and grab dependencies. This didn't work for me on a
    later version of Node.

    FROM THE DIRECTORY WHERE printer is downloaded (this will almost certainly be node_modules), do the following:
    npm config set msvs_version 2017
    npm config set python C:\Users\n\.windows-build-tools\python27\python.exe
    npx node-gyp rebuild --python C:\Users\n\.windows-build-tools\python27
    npx node-gyp rebuild
    npx electron-rebuild

    I tried and failed with:

    node-printer
    electron-printer
    @thiagoelg/node-printer -- this probably would have worked, but I didn't have the above information before getting started, so DOOM.

    The exercise of how you integrate the package into your application is left to the reader. Documentation for the exposed API can be found here: https://github.com/tojocky/node-printer

    Thanks for making this project. It saved me from having to do it myself.

    gl hf

    -- nic

    Oh! And I added externals: { 'printer': 'commonjs printer' } to the webpack for my main.
    nic seltzer
    @nicseltzer
    Final thought -- windows-build-tools, I pinned to 4.0.0
    hari
    @hrydi
    hi mr.tojocky thank you for the great tools
    i wanna ask something
    i just build electron app using this library, but today i face a problem
    like the printer jobs never finished
    it just stuck at the printer queue