This guide helps printing files (Text, Images, PDF) with a POS-58 Thermoprinter – tested with Zijiang 58 – on macOS 11+.
- Download this repository to your Computer
- Install driver with the help of installer.sh
- Add printer to CUPS
- Print files with printer.sh
Download this repository to your Computer with the green Button above as a zip file and extract it.
- Open Terminal via Spotlight or from
/Applications/Utilities/Terminal
. - Enter cd and a space
cd
and drag the extracted folder from Finder into Terminal. - Enter
sudo bash install.sh
hit ⏎ Enter and confirm with your password. This installs the printing filterrastertozj
.
- Enter
cupsctl WebInterface=yes
into Terminal and hit ⏎ Enter. - Open http://localhost:631/admin in your Browser.
- Click Add Printer and if prompted, login with your username and password.
- Choose the Printer "GD32 Microelectronics" and click Continue.
- Instead of selecting a brand click on Choose Driver and choose the file
ZJ-58.ppd
in the repository folder. - Click on Save as Default.
- In the Terminal enter
bash printer.sh file.pdf
. Replace "file.pdf" with the file you want to print. - If the file to print is saved in a different location drag the file into Terminal:
bash printer.sh /Users/admin/Documents/image.jpg
- Because of an unkown error the printer can not be used as a regular printer. Before each print, you have to uninstall an reinstall it. That is what the file
printer.sh
is doing. - Default page size is 48mm by 105mm. To change you need to edit the file
ZJ-58.ppd
. Copy the line*PageSize X48MMY105MM/58mm x 105mm:...
and change the length of the paper and the resolution. Afterwards change the default size*DefaultPageSize:
to your new size. - You can generate your print files with basiljs, html2pdf or simply use a textfile.
- You can start the print command from any source like Bash, Processing (Java), Python, a local Webserver (PHP, NodeJS), basiljs, MaxMSP and many more.