virpalacios Active Member Licensed User Longtime User Nov 25, 2013 #1 Hi, I am trying to print using PrintBot (for printing using WIFI), I already launch it using the Package Manager, however the user has to choose the file for printing ( receipt.txt). Checking at Print Bot WebSite they have a small Java code to Print a file directly. I made several tries to rewrite it using B4A however I am missing someting. I appreciate if someone can check it, it will very useful for printing in Indoors environments. Best Regards Code: Copy Intent intent = new Intent("net.jsecurity.printbot.action.PRINT"); intent.setDataAndType(uriToPrint, "text/html"); startActivity(intent);
Hi, I am trying to print using PrintBot (for printing using WIFI), I already launch it using the Package Manager, however the user has to choose the file for printing ( receipt.txt). Checking at Print Bot WebSite they have a small Java code to Print a file directly. I made several tries to rewrite it using B4A however I am missing someting. I appreciate if someone can check it, it will very useful for printing in Indoors environments. Best Regards Code: Copy Intent intent = new Intent("net.jsecurity.printbot.action.PRINT"); intent.setDataAndType(uriToPrint, "text/html"); startActivity(intent);
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2013 #2 This is equivalent to: Code: Copy Dim in As Intent in.Initialize("net.jsecurity.printbot.action.PRINT", uriToPrint) in.SetType("text/html") StartActivity(in) You can build uriToPrint with: "file://" & File.Combine(..., ...) Upvote 0
This is equivalent to: Code: Copy Dim in As Intent in.Initialize("net.jsecurity.printbot.action.PRINT", uriToPrint) in.SetType("text/html") StartActivity(in) You can build uriToPrint with: "file://" & File.Combine(..., ...)
Roberto P. Well-Known Member Licensed User Longtime User Dec 4, 2014 #3 hello how do I print a html file (or pdf) with a Bluetooth printer? regards Upvote 0