walterf25 Expert Licensed User Longtime User Oct 31, 2022 #1 Hi all, I am still trying to get my cheap printer to work, I have obtained the attached files from the manufacturer, unfortunately my javascript knowledge is very little, How would I go around using this libraries with Abmaterial. I have the following code so far: B4X: Dim jsval As String = $"var dtPrinter = new LPAPI(); console.log('Walter Flores'); var printerNames = dtPrinter.getSupportedPrinters(); console.log(printerNames);"$ page.ws.Eval(jsval, Null) page.ws.Flush The printer is connected via USB to the PC. Is that the correct way to call a javascript code? Attached is also a demo html file where the js scripts are being used, i've renamed it with a .txt extension as I can't load a html file directly, just rename the file to demo.html to see or run the file. Any help will be greatly appreciated. Walter Attachments labelprinter.zip labelprinter.zip 7 KB · Views: 462 demo.html.txt demo.html.txt 12.9 KB · Views: 507
Hi all, I am still trying to get my cheap printer to work, I have obtained the attached files from the manufacturer, unfortunately my javascript knowledge is very little, How would I go around using this libraries with Abmaterial. I have the following code so far: B4X: Dim jsval As String = $"var dtPrinter = new LPAPI(); console.log('Walter Flores'); var printerNames = dtPrinter.getSupportedPrinters(); console.log(printerNames);"$ page.ws.Eval(jsval, Null) page.ws.Flush The printer is connected via USB to the PC. Is that the correct way to call a javascript code? Attached is also a demo html file where the js scripts are being used, i've renamed it with a .txt extension as I can't load a html file directly, just rename the file to demo.html to see or run the file. Any help will be greatly appreciated. Walter