2

I´m looking for a sustainable solution when it comes to communicating with hardware on a local machine. I´ve been reading about NPAPI but unfortunately it is being phased out.

I would like to run things like silent printing from a website. The system shall be able to decide if it shall print to a receipt printer or a A4-printer. At the moment I need to set a default printer but I would the system to determine which printer that shall be used.

I would also like to run a dll file that exists locally on the users machine.

Are there any other solutions for my problem?

Kind regards / H

hgerdin
  • 637
  • 2
  • 8
  • 24

1 Answers1

2

For hardware support, have a look at chrome.usb, chrome.bluetooth, chrome.sockets, and chrome.serial. These APIs are available to Chrome Apps.

"Running a DLL" doesn't quite makes sense unless you mean DllRegisterServer or some other executable that loads the DLL into its process space. Either way, Native Messaging is your friend. But note that you're going to need administrative access to the target machines; that's the only way to get Chrome to run arbitrary native executables.

As for specific library functionality, have you tried simply building the DLL as a NaCl module? There's a huge number of common libraries that are successfully running under NaCl with minimal porting effort, which bodes well for your DLL doing the same (assuming you have the source).

I have no idea what you mean by "sustainable," so I'm not trying to answer that part of your question.

sowbug
  • 4,644
  • 22
  • 29
  • Thank you for your answer. By sustainable I mean a solution that is not phased out like NPAPI. – hgerdin Jan 28 '14 at 07:03
  • @Sowbug: you wrote "But note that you're going to need administrative access to the target machines; that's the only way to get Chrome to run arbitrary native executables." Could you clarify this? or maybe link to some documentation about it? Does this imply that native-messaging will not work unless run on a machine with admin-rights? – FuzzyAmi Jul 03 '14 at 10:46
  • @hgerdin how did you solve this? Was NaCL or PPAPI the solution? My requirement is similar. I need to choose a printer based on the configuration from DB. Moreover like your requirement i need to be able to do this from a webapp and not from a Chrome app. – Sibi John Dec 19 '17 at 06:51