Format Gratis
Format Gratis
You can print from your webpage (localhost or website) through any iPhone browser
on your bluetooth thermal printer. It means that you just need to open your website
from any iPhone browser and clinking a button on your website will send print
command to Bluetooth print app provided that you install small program into your
web page
Instructions: - Enable Browser Print function in the app first
- Put following HTML link on your request webpage
<a href="bprint://<RESPONSEURL>">Print</a>
where <RESPONSEURL> is your response URL
e.g. <a href="bprint://http://www.mydomain.com/response.php?id=45">Print</a>
The response page must have data to print in JSON format
Now when you open your webpage with any iPhone browser and click on button click
me using above method, iPhone browser will launch Bluetooth print app installed on
device which will then try to access response URL i.e.
http://www.mydomain.com/response.php?id=45 and it will print JSON data accordingly
Note: If you are trying to access from localhost, make sure that you can access
localhost page in your browser. You can find several help tutorials for this.
Below are sample request file program and response file program. You need to open
request file in Chrome browser and on print button click, app will try to access
JSON content in response page and print that content.
//sending QR entry
$obj4->type = 3;//QR code
$obj4->value = 'sample qr text';//valid QR code value
$obj4->size = 40;//valid QR code size in mm (Min 40)
$obj4->align = 2;//0 if left, 1 if center, 2 if right
array_push($a,$obj4);
echo json_encode($a,JSON_FORCE_OBJECT);
//Note that same sequence will be used for printing content
//Note: If any non english entry is added, it will get auto get converted to text
special if this setting is on in the app. You will find this setting in Settings-
>Special Characters
?>