Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The OP's original reported printing issues were largely resolved, and are as now as described in post #8...
Quote:
I have made some tests and in PDF I noticed that if the the page is landscape and not portrait, only a part of the landscape page will be printed. I have a PDF with 3 pages and the second is landscape. It will be printed only a part of it. The 1st and the 3rd are printed ok.
Hi again,
I also hope that the problem was resolved but now I tried to print a PDF with some fields that can be edited filled with information and the result is the PDF without the information in the files (same as I would print the PDF before filling it.
I also have still the last problem of landscape and portrait pages. Before I wrongly explain my problem. My PDF does not have landscape pages. It only has portrait pages but the second page you have to turn the page as landscape to read it (the text inside this page is landscape). so is not a problem from cups. I tried to print it from my PC x86 (linux) with my local cups and I get no problem. CUPS tell me that the job was successfully printed
The result of pdfinfo of my pdf document:
CreationDate: Tue Jul 31 16:54:08 2018 UTC
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 3
Encrypted: no
Page 1 size: 595.08 x 841.68 pts
Page 1 rot: 0
Page 2 size: 595.08 x 841.68 pts
Page 2 rot: 0
Page 3 size: 595.08 x 841.68 pts
Page 3 rot: 0
File size: 653560 bytes
Optimized: no
PDF version: 1.4
Hi again,
the initial problem has recurred again. The plain text translated in ps was printed correctly but the PDF was not printed at all.
pdfinfo on this file gave me the following results:
Title: untitled
Subject: unspecified
Author: anonymous
Producer: ReportLab http://www.reportlab.com
CreationDate: Tue Aug 21 07:22:08 2018 UTC
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 1
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
Page rot: 0
File size: 48096 bytes
Optimized: no
PDF version: 1.3
cups output is:
----------------------------------ID---------------------------------Name-------------User-------------Size-----------Pages-------------State
HP_Color_LaserJet_CM2320nf_MFP-1222--------Unknown--------Withheld---------41k--------Unknown-------completed at Tue Aug 21 06:20:12 2018
HP_Color_LaserJet_CM2320nf_MFP-1223--------Unknown--------Withheld---------22k-----------1---------------canceled at Tue Aug 21 06:20:38 2018
The first print is the plain text converted in ps the second print is the PDF
Any ideas at least how to start verify again what could be wrong?
It's not obvious to me from the description and info you've posted as to what might be causing the issue here. You may need to dig deeper by examining the CUPS error_log following a print job.
D [22/Aug/2018:12:14:15 +0000] [Job 1227] Wrote 1 pages...
I [22/Aug/2018:12:14:15 +0000] Expiring subscriptions...
D [22/Aug/2018:12:14:15 +0000] [Job 1227] PID 26850 (/usr/lib/cups/filter/pstops) exited with no errors.
D [22/Aug/2018:12:14:15 +0000] [Job 1227] PID 26851 (/usr/lib/cups/filter/hpps) exited with no errors.
I [22/Aug/2018:12:14:16 +0000] Expiring subscriptions...
I [22/Aug/2018:12:14:17 +0000] Expiring subscriptions...
I [22/Aug/2018:12:14:18 +0000] Expiring subscriptions...
D [22/Aug/2018:12:14:18 +0000] [Client 26] Server address is "192.168.6.33".
D [22/Aug/2018:12:14:18 +0000] [Client 26] Accepted from 192.168.6.50:46800 (IPv4)
D [22/Aug/2018:12:14:18 +0000] [Client 26] Waiting for request.
D [22/Aug/2018:12:14:18 +0000] [Client 26] GET /admin/log/error_log HTTP/1.1
D [22/Aug/2018:12:14:18 +0000] cupsdSetBusyState: newbusy="Active clients, printing jobs, and dirty files", busy="Printing jobs and dirty files"
D [22/Aug/2018:12:14:18 +0000] [Client 26] Read: status=200
D [22/Aug/2018:12:14:18 +0000] [Client 26] No authentication data provided.
Looks like it printed a page. Is the user in the lp and/or lpadmin group (for debian, might be another group for other distros)? Also cups over a network requires email to manage jobs. In debian that's as simple as letting exim4 run. And perhaps installing exim4 if you started with a minimal install. In addition to cups and cups-browsed on the server machine. One trick I seem to need to do is to put in the /etc/hosts file of the client machine, the servers "hostname" and it's IPv4 address. So "192.168.6.33 printer_host", so it'll print on the remote machine. Probably not best practices / proper as distros have tools and packages that do those steps for you, if you use their tools.
I can't see anything wrong with the print filters. Everything executed ok. Just to seek a bit more clarification - Are you printing from host to network printer, or via a CUPS server on the LAN?
Hi Ferrari,
I print directly fro the host machine (Raspberry PI). The host machine has CUPS installed and also the mail server to send to me a notification. In the script the command line to print is (see script):
The 192.168.6.50 is another machine. On this machine there is installed a OPENVPN so that I can have a connection to my 192.168.6.xx network so I can print on the 192.168.6.35 HP network printer directly from my remote computer trough VPN. Strange that there is mentioned in the error logfile.
If I print the same PDF, that give me problems on the 192.168.6.33 machine, from my computer using CUPS on my computer I have no problem printing the PDF file
my computer ------------------ 2.1.3 -------------------- HP Color LaserJet cm2320nf MFP pcl3, hpcups 3.16.3-----------------------------hp:/net/HP_Color_LaserJet_CM2320nf_MFP?ip=192.168.6.35
192.168.6.33-----------------------2.2.1---------------------HP Color LaserJet CM2320 MFP Series Postscript (recommended)----------------hp:/net/HP_Color_LaserJet_CM2320nf_MFP?ip=192.168.6.35
Looks like it printed a page. Is the user in the lp and/or lpadmin group (for debian, might be another group for other distros)?
pi user belongs to the following groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
Quote:
Originally Posted by Shadow_7
Also cups over a network requires email to manage jobs. In debian that's as simple as letting exim4 run. And perhaps installing exim4 if you started with a minimal install.
I don't have exim4 but I have installed mutt. Is enough?
No, there should be no need to belong to a particular group for CUPS printing. (It used to be that the 'lp' group was required for r/w access to USB/Parallel/Serial port printing, but these days udev/ACLs take care of such access.)
This is telling though...
Quote:
my computer ------------------ 2.1.3 -------------------- HP Color LaserJet cm2320nf MFP pcl3, hpcups 3.16.3-----------------------------hp:/net/HP_Color_LaserJet_CM2320nf_MFP?ip=192.168.6.35
192.168.6.33-----------------------2.2.1---------------------HP Color LaserJet CM2320 MFP Series Postscript
The wrong driver is configured for the 192.168.6.33 host.
lp -o media=A4,tray1 -o fit-to-page -o position=top -o scaling=100 BE0.pdf
request id is HP_Color_LaserJet_CM2320nf_MFP-1234 (1 file(s))
Now the PDF will be printed from the CPUS on the 192.168.6.33 machine but the message on CUPS is still
HP_Color_LaserJet_CM2320nf_MFP-1234--------------Unknown--------------Withheld-------------47k------------1------------canceled at Thu Aug 23 12:21:02 2018
So I tried to find a driver that tell me that the job is completed
Tried other driver:
CM2320_MFP. The plain TXT is printed but only a part of the PDF page will be printed (with a second try the PDF is printed perhaps little bit more or less)
Postscript driver: The plain TXT is printed correctly and CUPS tell that this job is completed but the PDF is printed only a part of it
So I have reinstalled the HP Color LaserJet cm2320nf MFP pcl3, hpcups 3.16.11 driver tried to print again and this time the PDF is printed only y part of it.
I went to CUPS and push the button "reprint job" (only for the PDF file) and this time the PDF was printed correctly..... Very strange.....
Ok, so I can see that you configured the HPLIP driver again. So, this was all working with this driver until you then reported an issue at post #17. It now appears that you've been playing with different CUPS drivers that are available for this model (including the postscript and gutenprint drivers). The HPLIP driver is designed to work with the proprietary hp backend. The other two drivers use the generic CUPS backends (usb,socket, ipp etc), so I'm not surprised things were not working as expected.
The filter chain involved with the PDF print job is pdftopdf ---> pdftops ---> hpps. The pdftops filter is apparently failing...
Code:
D [27/Aug/2018:07:10:38 +0000] [Job 1260] PID 31060 (/usr/lib/cups/filter/hpps) was terminated normally with signal 15.
D [27/Aug/2018:07:10:38 +0000] [Job 1260] The print file is empty.
D [27/Aug/2018:07:10:38 +0000] [Job 1260] PID 31064 (gs) was terminated normally with signal 0!
D [27/Aug/2018:07:10:38 +0000] [Job 1260] PID 31065 (pstops) stopped with status 1!
D [27/Aug/2018:07:10:38 +0000] [Job 1260] PID 31059 (/usr/lib/cups/filter/pdftops) stopped with status 1.
Not sure why though. A bug report may be needed to help progress this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.