jordivuong
Posts: 3
Joined: Thu Jan 10, 2019 7:10 pm

Install a thermal printer driver on RBerry PI 3 B+

Thu Jan 10, 2019 7:26 pm

Hi everyone

I'm new to this forum and also on RBerry (and non native english speaker, excuse my english).

I'd like to install thermal printer drivers on NOOBS and it looks like I'm not really aware of how to do.
Here's what i got from the constructor website :
Image

I tried many things in the command, but nothing works.

Is anyone have any idea of what are the steps to follow for installing that driver ?

Thanks a lot.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Install a thermal printer driver on RBerry PI 3 B+

Fri Jan 11, 2019 1:46 am

jordivuong wrote:
Thu Jan 10, 2019 7:26 pm
Hi everyone

I'm new to this forum and also on RBerry (and non native english speaker, excuse my english).

I'd like to install thermal printer drivers on NOOBS and it looks like I'm not really aware of how to do.
Here's what i got from the constructor website :
Image

I tried many things in the command, but nothing works.

Is anyone have any idea of what are the steps to follow for installing that driver ?

Thanks a lot.

http://scruss.com/blog/2015/07/12/therm ... -pi-zj-58/
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Install a thermal printer driver on RBerry PI 3 B+

Fri Jan 11, 2019 4:20 am

Yeah, that driver doesn't work for the 80 mm printers, though
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Install a thermal printer driver on RBerry PI 3 B+

Fri Jan 11, 2019 10:39 am

scruss wrote:
Fri Jan 11, 2019 4:20 am
Yeah, that driver doesn't work for the 80 mm printers, though
There is a modified driver (source code) for the 80 mm printers. I'm using it. It doesn't seem to be perfect though, I'm getting frequent corruption on the start of the print, but the rest is fine.

jordivuong
Posts: 3
Joined: Thu Jan 10, 2019 7:10 pm

Re: Install a thermal printer driver on RBerry PI 3 B+

Wed Feb 06, 2019 10:01 pm

Hi guys,

Sorry for not answering... Thanks you for your answers.

I'm still in troubles with that printer. Here is where I am no :
- I installed cups (most recent version) on my pi
- I successfully installed the driver for the printer

But it does not work when I try to print anything or even to print the test page (error log below).

Now I try to install cups 1.5.4, but it constantly fail, and I don't understand why.

I found some guys in troubles with that printer on github but no solutions : https://github.com/IntegersOfK/Hoin-POS-58-80/issues

@rpdom
You said that there is a modified driver for the 80 mm printers. Could you share it with me ?

Thanks a lot

Error log :

Code: Select all

E [31/Jan/2019:13:59:51 +0100] [Job 17] Unable to open raster stream - : Broken pipe
E [31/Jan/2019:13:59:53 +0100] [Job 17] Job stopped due to filter errors; please consult the error_log file for details.
D [31/Jan/2019:13:59:53 +0100] [Job 17] The following messages were recorded from 13:59:49 to 13:59:53
D [31/Jan/2019:13:59:53 +0100] [Job 17] Adding start banner page "none".
D [31/Jan/2019:13:59:53 +0100] [Job 17] Adding end banner page "none".
D [31/Jan/2019:13:59:53 +0100] [Job 17] File of type application/vnd.cups-pdf-banner queued by "anonymous".
D [31/Jan/2019:13:59:53 +0100] [Job 17] hold_until=0
D [31/Jan/2019:13:59:53 +0100] [Job 17] Queued on "POS-80-Series" by "anonymous".
D [31/Jan/2019:13:59:53 +0100] [Job 17] time-at-processing=1548939589
D [31/Jan/2019:13:59:53 +0100] [Job 17] 4 filters for job:
D [31/Jan/2019:13:59:53 +0100] [Job 17] bannertopdf (application/vnd.cups-pdf-banner to application/pdf, cost 32)
D [31/Jan/2019:13:59:53 +0100] [Job 17] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [31/Jan/2019:13:59:53 +0100] [Job 17] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [31/Jan/2019:13:59:53 +0100] [Job 17] rastertopos (application/vnd.cups-raster to printer/POS-80-Series, cost 0)
D [31/Jan/2019:13:59:53 +0100] [Job 17] job-sheets=none,none
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[0]="POS-80-Series"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[1]="17"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[2]="anonymous"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[3]="Test Page"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[4]="1"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[5]="job-uuid=urn:uuid:f667d104-55cb-3e04-5602-33d7260e9e57 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1548939589 time-at-processing=1548939589"
D [31/Jan/2019:13:59:53 +0100] [Job 17] argv[6]="/var/spool/cups/d00017-001"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[8]="HOME=/var/spool/cups/tmp"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[10]="SERVER_ADMIN=root@raspberrypi"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[11]="SOFTWARE=CUPS/2.2.1"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[13]="USER=root"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[14]="CUPS_MAX_MESSAGE=2047"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[15]="CUPS_SERVER=/var/run/cups/cups.sock"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[17]="IPP_PORT=631"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[18]="CHARSET=utf-8"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[19]="LANG=fr_FR.UTF-8"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[20]="PPD=/etc/cups/ppd/POS-80-Series.ppd"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[21]="RIP_MAX_CACHE=128m"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[22]="CONTENT_TYPE=application/vnd.cups-pdf-banner"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[23]="DEVICE_URI=socket://192.168.1.100:9100"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[24]="PRINTER_INFO=POS-80-Series"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[25]="PRINTER_LOCATION="
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[26]="PRINTER=POS-80-Series"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[27]="PRINTER_STATE_REASONS=none"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[28]="CUPS_FILETYPE=document"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-raster"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[30]="AUTH_I****"
D [31/Jan/2019:13:59:53 +0100] [Job 17] Started filter /usr/lib/cups/filter/bannertopdf (PID 21261)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Started filter /usr/lib/cups/filter/pdftopdf (PID 21262)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Started filter /usr/lib/cups/filter/gstoraster (PID 21263)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Started filter /usr/lib/cups/filter/rastertopos (PID 21264)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Started backend /usr/lib/cups/backend/socket (PID 21265)
D [31/Jan/2019:13:59:53 +0100] [Job 17] execv failed: Exec format error
D [31/Jan/2019:13:59:53 +0100] [Job 17] PID 21264 (/usr/lib/cups/filter/rastertopos) stopped with status 108 (Exec format error)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Hint: Try setting the LogLevel to "debug" to find out more.
D [31/Jan/2019:13:59:53 +0100] [Job 17] STATE: +connecting-to-device
D [31/Jan/2019:13:59:53 +0100] [Job 17] Looking up \"192.168.1.100\"...
D [31/Jan/2019:13:59:53 +0100] [Job 17] pdftopdf: Last filter determined by the PPD: rastertopos; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [31/Jan/2019:13:59:53 +0100] [Job 17] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [31/Jan/2019:13:59:53 +0100] [Job 17] PDF template file doesn\'t have form. It\'s okay.
D [31/Jan/2019:13:59:53 +0100] [Job 17] PID 21261 (/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [31/Jan/2019:13:59:53 +0100] [Job 17] Color Manager: Calibration Mode/Off
D [31/Jan/2019:13:59:53 +0100] [Job 17] PID 21262 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [31/Jan/2019:13:59:53 +0100] [Job 17] Calling FindDeviceById(cups-POS-80-Series)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Found device /org/freedesktop/ColorManager/devices/cups_POS_80_Series
D [31/Jan/2019:13:59:53 +0100] [Job 17] Calling org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Calling FindDeviceById(cups-POS-80-Series)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Found device /org/freedesktop/ColorManager/devices/cups_POS_80_Series
D [31/Jan/2019:13:59:53 +0100] [Job 17] Calling GetProfileForQualifiers(Gray.....)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Found profile /org/freedesktop/ColorManager/profiles/POS_80_Series_Gray__
D [31/Jan/2019:13:59:53 +0100] [Job 17] Calling org.freedesktop.ColorManager.Profile.Get(Filename)
D [31/Jan/2019:13:59:53 +0100] [Job 17] Use profile filename: \'\'
D [31/Jan/2019:13:59:53 +0100] [Job 17] Color Manager: ICC Profile: 
D [31/Jan/2019:13:59:53 +0100] [Job 17] Ghostscript using Any-Part-of-Pixel method to fill paths.
D [31/Jan/2019:13:59:53 +0100] [Job 17] Ghostscript command line: gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r203x203 -dDEVICEWIDTHPOINTS=227 -dDEVICEHEIGHTPOINTS=595 -dcupsBitsPerColor=1 -dcupsColorOrder=0 -dcupsColorSpace=3 -scupsPageSizeName=X80mmY210mm -I/usr/share/cups/fonts -c \'<</.HWMargins[11.000000 0.000000 12.000000 0.000000] /Margins[0 0]>>setpagedevice\' -f -_
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[0]=\"CUPS_CACHEDIR=/var/cache/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[1]=\"CUPS_DATADIR=/usr/share/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[2]=\"CUPS_DOCROOT=/usr/share/cups/doc-root\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[3]=\"CUPS_FONTPATH=/usr/share/cups/fonts\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[4]=\"CUPS_REQUESTROOT=/var/spool/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[5]=\"CUPS_SERVERBIN=/usr/lib/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[6]=\"CUPS_SERVERROOT=/etc/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[7]=\"CUPS_STATEDIR=/var/run/cups\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[8]=\"HOME=/var/spool/cups/tmp\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[9]=\"PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[10]=\"SERVER_ADMIN=root@raspberrypi\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[11]=\"SOFTWARE=CUPS/2.2.1\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[12]=\"TMPDIR=/var/spool/cups/tmp\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[13]=\"USER=root\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[14]=\"CUPS_MAX_MESSAGE=2047\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[15]=\"CUPS_SERVER=/var/run/cups/cups.sock\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[16]=\"CUPS_ENCRYPTION=IfRequested\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[17]=\"IPP_PORT=631\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[18]=\"CHARSET=utf-8\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[19]=\"LANG=fr_FR.UTF-8\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[20]=\"PPD=/etc/cups/ppd/POS-80-Series.ppd\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[21]=\"RIP_MAX_CACHE=128m\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[22]=\"CONTENT_TYPE=application/vnd.cups-pdf-banner\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[23]=\"DEVICE_URI=socket://192.168.1.100:9100\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[24]=\"PRINTER_INFO=POS-80-Series\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[25]=\"PRINTER_LOCATION=\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[26]=\"PRINTER=POS-80-Series\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[27]=\"PRINTER_STATE_REASONS=none\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[28]=\"CUPS_FILETYPE=document\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[29]=\"FINAL_CONTENT_TYPE=application/vnd.cups-raster\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] envp[30]=\"AUTH_INFO_REQUIRED=none\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] Start rendering...
D [31/Jan/2019:13:59:53 +0100] [Job 17] Processing page 1...
D [31/Jan/2019:13:59:53 +0100] [Job 17] hrDeviceDesc=\"Unknown\"
D [31/Jan/2019:13:59:53 +0100] [Job 17] Error: /ioerror in --showpage--
D [31/Jan/2019:13:59:53 +0100] [Job 17] Operand stack:
D [31/Jan/2019:13:59:53 +0100] [Job 17] true   (/var/spool/cups/tmp/gs_mLMxHD)   --nostringval--   1   true
D [31/Jan/2019:13:59:53 +0100] [Job 17] Execution stack:
D [31/Jan/2019:13:59:53 +0100] [Job 17] %interp_exit   .runexec2   --nostringval--   showpage   --nostringval--   2   %stopped_push   --nostringval--   showpage   showpage   false   1   %stopped_push   2045   2   3   %oparray_pop   2044   2   3   %oparray_pop   2025   2   3   %oparray_pop   showpage   2026   4   3   %oparray_pop   showpage   showpage   2   1   1   showpage   %for_pos_int_continue   2029   4   7   %oparray_pop   showpage   showpage   1890   3   9   %oparray_pop   showpage   showpage
D [31/Jan/2019:13:59:53 +0100] [Job 17] Dictionary stack:
D [31/Jan/2019:13:59:53 +0100] [Job 17] --dict:968/1684(ro)(G)--   --dict:1/20(G)--   --dict:83/200(L)--   --dict:83/200(L)--   --dict:133/256(ro)(G)--   --dict:310/450(ro)(G)--   --dict:32/32(L)--   --dict:6/9(L)--   --dict:7/20(L)--
D [31/Jan/2019:13:59:53 +0100] [Job 17] Current allocation mode is local
D [31/Jan/2019:13:59:53 +0100] [Job 17] Last OS error: Broken pipe
D [31/Jan/2019:13:59:53 +0100] [Job 17] GPL Ghostscript 9.26: Unrecoverable error, exit code 1
D [31/Jan/2019:13:59:53 +0100] [Job 17] Rendering completed
D [31/Jan/2019:13:59:53 +0100] [Job 17] PID 21263 (/usr/lib/cups/filter/gstoraster) stopped with status 1.
D [31/Jan/2019:13:59:53 +0100] [Job 17] Hint: Try setting the LogLevel to "debug" to find out more.
D [31/Jan/2019:13:59:53 +0100] [Job 17] prtGeneralCurrentLocalization type is 0, expected 2!
D [31/Jan/2019:13:59:53 +0100] [Job 17] backendWaitLoop(snmp_fd=5, addr=0x121d40c, side_cb=0x4ab6a0)
D [31/Jan/2019:13:59:53 +0100] [Job 17] PID 21265 (/usr/lib/cups/backend/socket) exited with no errors.
D [31/Jan/2019:13:59:53 +0100] [Job 17] End of messages
D [31/Jan/2019:13:59:53 +0100] [Job 17] printer-state=3(idle)
D [31/Jan/2019:13:59:53 +0100] [Job 17] printer-state-message="Rendering completed"
D [31/Jan/2019:13:59:53 +0100] [Job 17] printer-state-reasons=none

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Install a thermal printer driver on RBerry PI 3 B+

Thu Feb 07, 2019 3:17 pm

I'm trying to remember where I found the modified code for the 80mm printer. I believe it was on github. I just needed to compile it and do some quick installation.

Actually, I think it was this one: https://github.com/francoisbouffardtrio/ZJ-8001
Unreadable squiggle

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Install a thermal printer driver on RBerry PI 3 B+

Thu Feb 07, 2019 3:29 pm

jordivuong wrote:
Wed Feb 06, 2019 10:01 pm
Now I try to install cups 1.5.4, but it constantly fail, and I don't understand why.
These printers should work fine with the stock Raspbian CUPS. It's the driver that's likely to be the main issue.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Install a thermal printer driver on RBerry PI 3 B+

Thu Feb 07, 2019 3:45 pm

scruss wrote:
Thu Feb 07, 2019 3:29 pm
jordivuong wrote:
Wed Feb 06, 2019 10:01 pm
Now I try to install cups 1.5.4, but it constantly fail, and I don't understand why.
These printers should work fine with the stock Raspbian CUPS. It's the driver that's likely to be the main issue.
They do.
I'm using a standard Raspbian Stretch Lite install with cups 2.2.1-8+deb9u2 and the driver that I previously posted.

I do have some problems with the first few lines of print getting mangled at times, but after some investigation I suspect it may be the printer at fault.
Unreadable squiggle

jordivuong
Posts: 3
Joined: Thu Jan 10, 2019 7:10 pm

Re: Install a thermal printer driver on RBerry PI 3 B+

Fri Feb 08, 2019 12:27 am

rpdom wrote:
Thu Feb 07, 2019 3:45 pm
scruss wrote:
Thu Feb 07, 2019 3:29 pm
jordivuong wrote:
Wed Feb 06, 2019 10:01 pm
Now I try to install cups 1.5.4, but it constantly fail, and I don't understand why.
These printers should work fine with the stock Raspbian CUPS. It's the driver that's likely to be the main issue.
They do.
I'm using a standard Raspbian Stretch Lite install with cups 2.2.1-8+deb9u2 and the driver that I previously posted.

I do have some problems with the first few lines of print getting mangled at times, but after some investigation I suspect it may be the printer at fault.
Thanks for sharing the driver.

It looks like it's the good one (my printer is an excelvan too), bu I got some troubles for installing.
When I installed I had to change a line in the install file (changing a "ZJ-58.ppd" to a "ZJ-58.ppd").

Here is what I got :

Code: Select all

pi@raspberrypi:~/Desktop/ZJ-8001-master $ sudo ./Makefile
./Makefile: 2: ./Makefile: -f: not found
./Makefile: 3: ./Makefile: -Wall: not found
./Makefile: 5: ./Makefile: -lcups: not found
./Makefile: 8: ./Makefile: SRCS: not found
./Makefile: 8: ./Makefile: subst: not found
./Makefile: 10: ./Makefile: all:: not found
./Makefile: 12: ./Makefile: OBJS: not found
./Makefile: 12: ./Makefile: rastertozj:: not found
./Makefile: 13: ./Makefile: LDFLAGS: not found
./Makefile: 13: ./Makefile: LDLIBS: not found
rastertozj.o : Dans la fonction « getOptionChoiceIndex » :
rastertozj.c:(.text+0x1b0) : référence indéfinie vers « ppdFindMarkedChoice »
rastertozj.c:(.text+0x1d8) : référence indéfinie vers « ppdFindOption »
rastertozj.c:(.text+0x1e8) : référence indéfinie vers « ppdFindChoice »
rastertozj.o : Dans la fonction « initializeSettings » :
rastertozj.c:(.text+0x220) : référence indéfinie vers « ppdOpenFile »
rastertozj.c:(.text+0x228) : référence indéfinie vers « ppdMarkDefaults »
rastertozj.c:(.text+0x238) : référence indéfinie vers « cupsParseOptions »
rastertozj.c:(.text+0x260) : référence indéfinie vers « cupsMarkOptions »
rastertozj.c:(.text+0x26c) : référence indéfinie vers « cupsFreeOptions »
rastertozj.c:(.text+0x2a4) : référence indéfinie vers « ppdFindMarkedChoice »
rastertozj.c:(.text+0x2d8) : référence indéfinie vers « ppdFindMarkedChoice »
rastertozj.c:(.text+0x30c) : référence indéfinie vers « ppdFindMarkedChoice »
rastertozj.c:(.text+0x340) : référence indéfinie vers « ppdFindMarkedChoice »
rastertozj.c:(.text+0x368) : référence indéfinie vers « ppdClose »
rastertozj.c:(.text+0x37c) : référence indéfinie vers « ppdFindOption »
rastertozj.c:(.text+0x38c) : référence indéfinie vers « ppdFindChoice »
rastertozj.c:(.text+0x3a8) : référence indéfinie vers « ppdFindOption »
rastertozj.c:(.text+0x3b8) : référence indéfinie vers « ppdFindChoice »
rastertozj.c:(.text+0x3d4) : référence indéfinie vers « ppdFindOption »
rastertozj.c:(.text+0x3e4) : référence indéfinie vers « ppdFindChoice »
rastertozj.c:(.text+0x400) : référence indéfinie vers « ppdFindOption »
rastertozj.c:(.text+0x410) : référence indéfinie vers « ppdFindChoice »
rastertozj.o : Dans la fonction « main » :
rastertozj.c:(.text.startup+0x68) : référence indéfinie vers « cupsRasterOpen »
rastertozj.c:(.text.startup+0xa8) : référence indéfinie vers « cupsRasterReadHeader2 »
rastertozj.c:(.text.startup+0x190) : référence indéfinie vers « cupsRasterReadPixels »
rastertozj.c:(.text.startup+0x39c) : référence indéfinie vers « cupsRasterClose »
rastertozj.c:(.text.startup+0x49c) : référence indéfinie vers « cupsRasterClose »
collect2: error: ld returned 1 exit status
./Makefile: 15: ./Makefile: rastertozj.o:: not found
./Makefile: 16: ./Makefile: CFLAGS: not found
rastertozj.c:87:16: warning: ‘rasterModeStartCommand’ is static but used in inline function ‘rasterheader’ which is not static
  outputCommand(rasterModeStartCommand);
                ^~~~~~~~~~~~~~~~~~~~~~
and

Code: Select all

pi@raspberrypi:~/Desktop/ZJ-8001-master $ sudo ./install
[ ok ] Stopping cups (via systemctl): cups.service.
cp: impossible d'évaluer 'rastertozj': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer 'ZJ-58.ppd': Aucun fichier ou dossier de ce type
/home/pi/Desktop/ZJ-8001-master
[ ok ] Starting cups (via systemctl): cups.service.
Then impossible to run the orinter cause the ppd did not copied.
So I tried to do it manually by the cup GUI, but then impossible to access to the "add printer" because of "forbidden".

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Install a thermal printer driver on RBerry PI 3 B+

Fri Feb 08, 2019 3:39 am

Don't execute the Makefile. Just do:

Code: Select all

make
(and no sudo)
Did you install the required packages?

Code: Select all

sudo apt-get install libcups2-dev libcupsimage2-dev git build-essential cups system-config-printer
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

elvinsanders
Posts: 2
Joined: Mon Apr 27, 2020 6:28 pm

Re: Install a thermal printer driver on RBerry PI 3 B+

Mon Apr 27, 2020 8:29 pm

Hi, I'm trying to print 80mm on my excelvan printer, using the ZJ-8001 driver linked above -

Can anyone tell me quite literally what i'm supposed to do with the files in this zip package? like the install / ppd etc?

Can anyone help me here? Sorry I'm very new to this

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Install a thermal printer driver on RBerry PI 3 B+

Wed Apr 29, 2020 3:43 pm

The linked 8001 driver hasn't seen as much love as klirichek / zj-58, which now (supposedly) supports 80 mm printers. So maybe forget that zip file.

** I don't have an 80 mm printer. This is untested **

I'm also assuming you're using a desktop rather than minimal install, because the desktop's system-config-printer is good and the command line method isn't.

Try this (lightly modified from Building and installing):

Code: Select all

sudo apt install build-essential cmake libcups2-dev libcupsimage2-dev system-config-printer
git clone https://github.com/klirichek/zj-58.git
cd zj-58
mkdir build && cd build && cmake ..
cmake --build .
make
sudo make install
Now go through the desktop's Preferences → Printer menu and add your printer. You'll probably need your password a couplle of times
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

elvinsanders
Posts: 2
Joined: Mon Apr 27, 2020 6:28 pm

Re: Install a thermal printer driver on RBerry PI 3 B+

Wed Apr 29, 2020 5:46 pm

scruss wrote:
Wed Apr 29, 2020 3:43 pm
The linked 8001 driver hasn't seen as much love as klirichek / zj-58, which now (supposedly) supports 80 mm printers. So maybe forget that zip file.

** I don't have an 80 mm printer. This is untested **

I'm also assuming you're using a desktop rather than minimal install, because the desktop's system-config-printer is good and the command line method isn't.

Try this (lightly modified from Building and installing):

Code: Select all

sudo apt install build-essential cmake libcups2-dev libcupsimage2-dev system-config-printer
git clone https://github.com/klirichek/zj-58.git
cd zj-58
mkdir build && cd build && cmake ..
cmake --build .
make
sudo make install
Now go through the desktop's Preferences → Printer menu and add your printer. You'll probably need your password a couplle of times
Thanks for your reply, this looks like a god step forward but I'm still having this same issue which is that my printer still is only printing with the 58mm format, instead of 80mm

So I ran the code you sent in my terminal on my RPi4, downloaded the new zip folder you provided (thanks) and proceeded to install a new printer on CUPS, and going through the usual steps expect this time selecting the .ppd (ZJ-80.ppd) provided in the new zip. It seems to like this PPD, as before with the previous ZJ-80.ppd I got a 'Bad PPD' message. Despite all of this, when selecting the new printer on my computer and sending a print file from photoshop, I'm still only getting 58mm coverage :( :(

Is there anything else I should have done, like something with the install file or the cmake or rasterzog etc?

Thanks for your help so far anyway!

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Install a thermal printer driver on RBerry PI 3 B+

Wed Apr 29, 2020 11:05 pm

Sorry, don't know.

One detail: your printer has a 72 mm print width. At 8 dots/mm, you've got 576 dots across the page. You basically want zero margins because you've got 4 mm margins at the side you can do nothing about. If you send the printer a page size it doesn't know about, it'll scale it down to fit.

TBH, the paper sizes look wrong in the zj80.ppd from the zj-58 package, but seem better in the ZJ-8001 one. I don't think you can copy one to the other and expect it to work
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Return to “Beginners”