Skip to content
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

Does this work on Windows? #47

Open
alexb148 opened this issue Mar 23, 2022 · 2 comments
Open

Does this work on Windows? #47

alexb148 opened this issue Mar 23, 2022 · 2 comments

Comments

@alexb148
Copy link

Hello, can anyone tell me if this should work on Windows?

The readme seems to suggest that Windows is supported, but when trying to print using Printer.printFile() it works fine on macOS, but gives me the message 'Error: Not yet implemented on Windows'.

My code is essentially:

const Printer = require('@thiagoelg/node-printer');

Printer.printFile({
    filename: newFilename,
    // printer: printerName, // printer name, if missing then will print to default printer
    options: {
        'fit-to-page': true,
    },
    success: function (jobID) {
        resolve(jobID);
    },
    error: function (err) {
        reject(err);
    },
})

This is on an up-to-date version of Windows 10 on a Surface Go tablet.

If this package does not support Windows it would be useful to know, thank you.

@itsthejoker
Copy link

I can successfully print using printDirect with RAW encoding for my T88V on Windows 11, if that helps.

@driehle
Copy link

driehle commented Jul 21, 2022

Look at the source code for Windows: https://github.com/thiagoelg/node-printer/blob/main/src/node_printer_win.cc#L746

The printFile function is simply not implemented. So this cannot work on Windows. I guess you'll have to use printDirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants