I asked here some months ago how to print and check results with lp command (CUPS) in Ubuntu.
After few working around, I was able to print normal text files. I was able to print selecting some options (double sided print, media size, paper tray input, etc.)
I got the linux drivers here (PPD files): https://www.openprinting.org/download/PPD/
Now I have a little problem: When I send a .pdf file to the printer (Ricoh MP Aficio 1106 EX connected by TCP-IP), the print goes slow, getting +30 seconds to send the file to the printer. The .txt files print at the moment I send them. Do you have any idea how to solve it?
I tryied change the socket of the machine to 9100 port, but that only generates errors.
I tryied using LPR command, instead LP:
lpr -sPrinterIP /absolute/path/to/file.pdf
But works slowly too.
I installed qz-tray, a kind of print server/API. When I try PDF demo, it prints slow too.
EDIT3: I tryied now with default PDF viewer (EVINCE) because I though I have a lack of memory and printed the same file. It worked well, at normal speed.
EDIT4: I tyied some other drivers (generic and recomended by the printer maker ones), same speed.
I found this link: https://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS
But cannot understand if filtering is "f..king me off", because my printer is a PCL one (and i am using a pxl driver...). Could anyone explain me this?
Found the origin of the problem: When I print a text-only-pdf file, it works like a charm. But when I send an image-pdf file, the print enters in a pre-print process (I cannot completely assure this) and get +30seconds to send any package to printer (this checked with wireshark).
I can asume that PPD file (driver file provided by Ricoh Support) has anything in the code that send any order to process the file.
I found this in the PPD file. I think is the root of this slowing problem:
*%========== Ghostscript Command line ========== *FoomaticRIPCommandLine: "(printf '\033%%-12345X@PJL\n@PJL JOB\n@PJL SET COPIES=&copies;\n'%G|perl -p -e "s/\x26copies\x3b/1/" (gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -dNOMEDIAATTRS -dNOINTERPOLATE %B%A%C %D%E | perl -p -e "s/^\x1b\x25-12345X//" | perl -p -e "s/\xc1\x01\x00\xf8\x31\x44/\x44/g" (printf '@PJL\n@PJL EOJ\n\033%%-12345X&apos" *End
Found this article https://lists.linuxfoundation.org/pipermail/printing-foomatic/2012/002791.html taht confirms my ideas: the ppd driver is rendering all files with ghostcript.
EDIT 7: Ricoh support told me that "lp" printing command may be using "default PDF viewer" to process the file, and slow the print process. I don't know how to check it.
Thanks a lot.