Closed x09 closed 7 months ago
Hi,
the difference in files which are sent to printer between lp and application is not a bug in most cases - the fact you have opened PDF in an application does not mean the application sends the same file for printing - it usually is not the same PDF and sometimes not even PDF. Applications usually generate a new file (either PDF or some other format) when sending the file to CUPS, but lp sends the exact file you pass on CLI.
Since you mention ghostscript, I would guess the application sends Postscript file to CUPS, while lp sends the original PDF, which might contain fonts unknown to the printer (my guess) - so my first advice is to update firmware on printer.
Either way, artifacts when printing via lp is not desired and can be issue in printing stack.
Please check https://github.com/OpenPrinting/cups/blob/master/REPORTING_ISSUES.md and provide CUPS debug logs when you print from lp and application, PPD file for the printer you used, d files from /var/spool/cups
for jobs from lp and application, and scan of the output document with artifacts (ideally mark where artifacts are - if the issue is with local alphabet, I might not be able to tell whether the character is good or bad...).
[root@localhost cups]# cupsctl LogLevel=debug2 [root@localhost cups]# cat /etc/cups/printers.conf # Printer configuration file for CUPS v2.4.7 # Written by cupsd # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING NextPrinterId 2PrinterId 1 UUID urn:uuid:9a60a838-7f34-327e-4e26-dfc105bb705f Info Epson L3250 Location MakeModel EPSON L3250 Series , Epson Inkjet Printer Driver (ESC/P-R) for Linux DeviceURI file:/tmp/epson State Idle StateTime 1706847171 ConfigTime 1706847171 Type 4108 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job [root@localhost cups]# lpstat -e Epson-L3250 [root@localhost cups]# LANG=en_US.UTF-8 lpstat -t scheduler is running system default destination: Epson-L3250 device for Epson-L3250: /tmp/epson Epson-L3250 accepting requests since Fri 02 Feb 2024 07:12:51 AM MSK printer Epson-L3250 is idle. enabled since Fri 02 Feb 2024 07:12:51 AM MSK [root@localhost cups]# lpinfo -v network beh network ipps network ipp network lpd network http network https direct hp network socket network smb direct hpfax [root@localhost cups]# cd /var/log/cups/ [root@localhost cups]# echo >/var/log/cups/error_log; lp -d Epson-L3250 /home/tuser/myfile_1.pdf ; sleep 1; /bin/cp -f /var/log/cups/error_log /tmp/lp-error_log.txt [root@localhost cups]# echo >/var/log/cups/error_log; ...open atril and print myfile_1.pdf... ; /bin/cp -f /var/log/cups/error_log /tmp/gui-error_log.txt
lp vs gui
Thank you for the data!
Can you attach the file you try to print and d file from /var/spool/cups when you print from Atril? I can't check whether the file looks ok before it goes into epson filter without it :( . But the scans are great, I have something which I can compare with.
Additionally, the log for lp is missing the job - 1s wait is too short (you can make it a loop, checking until lpstat -o
does not return anything).
Describe the bug I have few printers, by example is EPSON L3250 (epson-inkjet-printer-escpr rpm) and Samsung SCX 3405 (Unified Linux Driver by HP/Samsung).
I have simple pdf file without any errors
additional information
If to print pdf from any GUI (Atril) then file printed perfectly. If to print pdf from command line (lp -d EPSON_L3250 /path/tofilename.pdf) then file printed with artefacts.
I uncomment FileDevice yes option in cups configuration, replace DeviceURI to file
And printed from GUI and from lp/lpr again file /tmp/printer.prn from lp and from GUI - have a differents sizes.
I turn on debug and compare cups/error_log The lp/lpr job is very different from GUI job. I see GUI job uses 'gs', but lp not
Why? How print from lp/lpr correctly? It's bug?
System Information: cups-2.4.7 Linux