LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-05-2018, 10:46 PM   #16
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139

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.
 
Old 08-10-2018, 05:56 AM   #17
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
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


Gian Carlo
 
Old 08-22-2018, 01:10 AM   #18
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
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?

Thanks

Regards

Gian Carlo
 
Old 08-22-2018, 05:01 AM   #19
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
Can you print a test page ok?
Code:
hp-testpage
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.

CUPS logging verbosity can be increased with
Code:
cupsctl --debug-logging
 
Old 08-22-2018, 07:22 AM   #20
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
Hi Ferrari,
I have increased the logging verbosity and tried to print a testpage with
Code:
hp-testpage -i
(no gui). I get lots of error messages and in the attachment you can find the this errors in the cups log file.

Cups tell me that the print was canceled

Regards

Gian Carlo
Attached Files
File Type: txt log error hp-testpage -i.txt (87.2 KB, 4 views)
 
Old 08-22-2018, 11:19 AM   #21
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Code:
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.
 
Old 08-22-2018, 02:43 PM   #22
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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?

192.168.6.33 host machine
192.168.6.35 network printer
192.168.6.50 ???
 
Old 08-23-2018, 12:41 AM   #23
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
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):

LP_OUTPUT=$(lp $LP_OPTIONS "$f")

with

LP_OPTIONS="-o media=A4,tray1 -o fit-to-page -o position=top -o scaling=100"

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

------------------------------------------CUPS version--------------------------driver----------------------------------------------------------------------------------connection

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


Gian Carlo
 
Old 08-23-2018, 12:49 AM   #24
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
Hi Shadow_7

Quote:
Originally Posted by Shadow_7 View Post

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 View Post
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?


Gian carlo
 
Old 08-23-2018, 02:49 AM   #25
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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.

Easily confirmed with
Code:
egrep -i "name|model|filter" /etc/cups/ppd/*
Compare results with your other (working host).
 
Old 08-24-2018, 12:10 AM   #26
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
Hi Ferrari,
I have tried to set the printer driver of 192.168.6.33 machine the same as my local driver:

Local computer driver

Code:
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*PCFileName: "hp-color_laserjet_cm2320nf_mfp-pcl3.ppd"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*ModelName: "HP Color LaserJet cm2320nf MFP"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*ShortNickName: "HP Color LaserJet cm2320nf MFP"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*NickName: "HP Color LaserJet cm2320nf MFP pcl3, hpcups 3.16.3"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*cupsModelName: "hp color LaserJet"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*cupsModelNumber: 0
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*cupsFilter: "application/vnd.cups-raster 0 hpcups"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*OpenUI *ColorModel/Output Mode: PickOne
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*OrderDependency: 10 AnySetup *ColorModel
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*DefaultColorModel: RGB
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*ColorModel Gray/Grayscale: "<</cupsColorSpace 3/cupsBitsPerColor 1/cupsRowCount 3/cupsRowStep 2>>setpagedevice"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*ColorModel RGB/Color: "<</cupsColorSpace 1/cupsBitsPerColor 8/cupsRowCount 3/cupsRowStep 0>>setpagedevice"
/etc/cups/ppd/HP-Color-LaserJet-cm2320nf-MFP.ppd:*CloseUI: *ColorModel
192.168.6.33 driver

Code:
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*PCFileName: "hp-color_laserjet_cm2320nf_mfp-pcl3.ppd"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*ModelName: "HP Color LaserJet cm2320nf MFP"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*ShortNickName: "HP Color LaserJet cm2320nf MFP"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*NickName: "HP Color LaserJet cm2320nf MFP pcl3, hpcups 3.16.11"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*cupsModelName: "hp color LaserJet"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*cupsModelNumber: 0
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*cupsFilter: "application/vnd.cups-raster 0 hpcups"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*OpenUI *ColorModel/Output Mode: PickOne
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*OrderDependency: 10 AnySetup *ColorModel
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*DefaultColorModel: RGB
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*ColorModel Gray/Grayscale: "<</cupsColorSpace 3/cupsBitsPerColor 1/cupsRowCount 3/cupsRowStep 2>>setpagedevice"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*ColorModel RGB/Color: "<</cupsColorSpace 1/cupsBitsPerColor 8/cupsRowCount 3/cupsRowStep 0>>setpagedevice"
/etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd:*CloseUI: *ColorModel
printed on 192.268.6.33 with the command

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.....

Regards

Gian Carlo
 
Old 08-24-2018, 03:16 AM   #27
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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.

Leave it configured with the hpcups driver.
 
Old 08-27-2018, 03:27 AM   #28
giancarlo64
Member
 
Registered: Jul 2018
Location: Switzerland
Distribution: debian
Posts: 36

Original Poster
Rep: Reputation: Disabled
Hi again Ferrari,
I have reinstalled the driver using "hp-setup"

Code:
Type: Printer
Device URI: hp:/net/HP_Color_LaserJet_CM2320nf_MFP?ip=192.168.6.35
PPD: /etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd
warning: Failed to read /etc/cups/ppd/HP_Color_LaserJet_CM2320nf_MFP.ppd ppd file
PPD Description: 
Printer status: printer HP_Color_LaserJet_CM2320nf_MFP is idle.  enabled since Mon 27 Aug 2018 07:10:46 UTC
Required plug-in status: Installed
But now, the script print me only plain text but not PDF files

I attach the error log file. JOB 1259 is the TXT page (converted in ps to be printed) and the job 1260 is the PDF page

I tried to print a test page from CUPS and is working and also the status of the print is completed

Gian Carlo
Attached Files
File Type: txt error-log_CM2320nf_MFP.txt (251.4 KB, 14 views)
 
Old 08-27-2018, 04:36 AM   #29
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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.
 
Old 08-27-2018, 05:05 AM   #30
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
Which version of cups-filters do you have installed?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Problems - Canon Pixma iP3000 printing only half of the last page of job beoram Linux - Hardware 1 08-04-2012 04:42 AM
[SOLVED] printing problems cups okular printing jobs debian squeeze epson stylus sx 410 Foxbat1155 Linux - Newbie 4 02-22-2012 02:49 PM
Printing problems hkillen Linux - Newbie 1 09-18-2006 09:07 AM
printing problems dreamsshinu Fedora 0 12-21-2004 12:13 PM
printing problems masterweaver Linux - Software 1 09-16-2004 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration