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

Error: StartDocPrinterW error: code: 1804, message: The specified datatype is invalid. #46

Open
prasheel888 opened this issue Mar 16, 2022 · 2 comments

Comments

@prasheel888
Copy link

i'm printing buffer as Image As a JPEG type here is my code

const Printer = require("@thiagoelg/node-printer");
 Printer.printDirect({
                    data: buffer,
                    type: "JPEG",
                    success: function (jobID) {
                      console.log("sent to printer with ID: " + jobID);
                    },

                    error: function (err) {
                      console.log(err);
                    },
                  });
                }
              });

and i didnt installed vscode,

@ItemME
Copy link

ItemME commented Jul 4, 2022

@thiagoelg Facing the exact same issue myself, tried to change type/data, recompiled the .node myself, but it seems that's it's breaking when calling the print_helper func in the lib (which is pretty reasonable considering the error is from node_printer_win.cc:735)

Also tried to switch different node versions, didn't make much of a difference, the error is the same as mentioned above.

Has anyone been able to fix this, or found a workaround?

@gaboroa14
Copy link

I'm encountering the exact same problem here, any workaround?

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