Giter VIP home page Giter VIP logo

thermoprinter's Introduction

Thermoprinter

This guide helps printing files (Text, Images, PDF) with a POS-58 Thermoprinter – tested with Zijiang 58 – on macOS 11+.


TL'DR

  1. Download this repository to your Computer
  2. Install driver with the help of installer.sh
  3. Add printer to CUPS
  4. Print files with printer.sh

How To

1. Download

Download this repository to your Computer with the green Button above as a zip file and extract it.

2. Installation

  1. Open Terminal via Spotlight or from /Applications/Utilities/Terminal.
  2. Enter cd and a space cd  and drag the extracted folder from Finder into Terminal.
  3. Enter sudo bash install.sh hit ⏎ Enter and confirm with your password. This installs the printing filter rastertozj.

3. Add printer to CUPS

  1. Enter cupsctl WebInterface=yes into Terminal and hit ⏎ Enter.
  2. Open http://localhost:631/admin in your Browser.
  3. Click Add Printer and if prompted, login with your username and password.
  4. Choose the Printer "GD32 Microelectronics" and click Continue.
  5. Instead of selecting a brand click on Choose Driver and choose the file ZJ-58.ppd in the repository folder.
  6. Click on Save as Default.

4. Printing

  1. In the Terminal enter bash printer.sh file.pdf. Replace "file.pdf" with the file you want to print.
  2. If the file to print is saved in a different location drag the file into Terminal: bash printer.sh /Users/admin/Documents/image.jpg

Tricks

  • 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.

thermoprinter's People

Contributors

hkbmedialab avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.