En español click acá -> Readme 🇪🇸
This is an example of how to print a label with a QR Code with b-PAC.
Before you begin, ensure you have met the following requirements:
-
You have installed the latest version of b-PAC Client Component Only.
❗ Note: Choose the version that corresponds to your Operating System (x86 - x64). -
You have installed the latest version of P-touch Editor.
-
You need to install Brother b-PAC Extension. This extension allows you to control Brother label and mobile printers from Chrome using b-PAC.
-
You have installed the latest version of the Printer Driver.
- Replace the path MODEL_FILE with one of your preference. Keep in mind you need Admin access to that path.
const MODEL_FILE = "C:\\Users\\user\\Desktop\\label.lbx";
- After that, you can take label.lbx file from assets/label/label.lbx and copy to the previous path.
Beyond the code, there are some points to be taken into account regarding the printer itself.
-
Make sure the Editor Lite light on the printer is OFF by holding down the button for a few seconds.
-
Check the size and type of the paper, either in P-Touch editor and printer settings. Both have to match.
To develop this example I read and copy-pasted some code from:
-
http://download.brother.com/pub/com/dev/pdf/bpac_webapplication_eng.pdf
-
https://stackoverflow.com/questions/59363053/adding-a-script-as-module-in-wordpress-admin-area
If you want to contact me you can reach me at mpablo182@gmail.com.