I'm trying to print a pdf onto paper programmatically, using lp
from a raspberry pi as part of an application for work. The PDF comes out of the printer looking like completely random unicode nonsense, and it prints page after page, even though the input is a single-page pdf document.
I installed two printers, a brother and a canon, using the cups
web interface with default options.
I did notice the following:
$> lpstat -a
Brother_HL-L6200DW_series accepting requests since Mon 18 Nov 2019 12:54:20 PM MST
Canon_MF642C_643C_644C accepting requests since Tue 26 Nov 2019 09:34:52 AM MST
PDF accepting requests since Wed 20 Nov 2019 02:10:44 PM MST
$> cupsfilter --list-filters -d Canon_MF642C_643C_644C race_sheet_281.pdf
gziptoany
$> cupsfilter --list-filters -d Brother_HL-L6200DW_series race_sheet_281.pdf
gziptoany
Both of these printers are connected over the network, btw.
It seems at cursory glance that the proper filters are not being used, but I did notice there is a plethora of filters in /usr/lib/cups/filter
:
ls /usr/lib/cups/filter/
bannertopdf commandtocanon emftopdf gziptoany imagetoubrl pdftopdf rastertoepson rastertopclm svgtopdf texttopdf vectortoubrl
brftoembosser commandtoepson foomatic-rip imagetobrf imageubrltoindexv3 pdftops rastertoescpx rastertopclx sys5ippprinter texttops wmftopdf
brftopagedbrf commandtoescpx gstopdf imagetopdf imageubrltoindexv4 pdftoraster rastertogutenprint.5.3 rastertopdf textbrftoindexv3 texttotext xfigtopdf
cgmtopdf commandtopclx gstopxl imagetops mupdftoraster pstops rastertohp rastertops textbrftoindexv4 vectortobrf
cmxtopdf commandtops gstoraster imagetoraster musicxmltobrf rastertodymo rastertolabel rastertopwg texttobrf vectortopdf
I'd like to print to either printer, but I'm not at leisure to just test this thing all day because the printers and the pi are in a different state and we have to ask our very busy client to stand at the printer every time we test.
Is this just a matter of finding drivers? If not, is it a matter of configuring the printer to use the proper filters?
Thank you in advance!