Only JavaScript being run by node, not the browser can call a dll. Browsers security will not all allow calling a dll. Node programs can call a dll, because it has support for JavaScript to call c/c++ code.
Browser JavaScript can call code compiled to WASM. But WASM runs in a stand box and does not have access to printers, files or network.
You can host the dll on the server, and call it to get the image. Or there are several JavaScript libraries to create a QR code in a canvas, from which the browser will print. This is the most common approach for printing QR codes. But label printers are a challenge.
Your final option is to write a browser extension. that is installed.