LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-17-2018, 06:56 AM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
can't print pdf


I have an HP CP1025, an old brute of a printer.

I can print a Libre Office document, but when I want to print a pdf, nothing happens, although I get a message 'job completed', I also get a 'system error' message. The little light on the printer keeps flashing, and only a reboot can get it to print a Libre Office document.

I am using Ubu 18.04, which I am finding very beta. Often it freezes on shutdown, the network connection gets lost when switching from vpn back to normal, Libre Office can freeze the computer, moan, moan.

Anyone know a fix for this problem of pdfs not printing?

I installed the printer using hplip-3.18.7.run from HP. It needs a proprietary software not supplied by Ubu.
 
Old 09-17-2018, 07:37 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Does the printer print PDFs successfully using any other distro or operating system?
 
Old 09-17-2018, 08:18 AM   #3
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,217

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
What application are you trying to print the .pdf with? I use Okular on a regular basis without problems.

There are some .pdf's that are password protected, and who know what else. What is the source of the file(s) you are having problems with?
 
Old 09-17-2018, 09:11 AM   #4
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I only have Ubuntu at home, no other distro. I'm not an expert, and Ubu is relatively easy to use.

I had no problem doing this in 16.04.

The pdfs are not protected, I generated them.

Whatever default pdf reader comes with Ubu 18.04, that's what I have, seems to be Document Viewer 3.28.2

Also, this is only a problem with the HP printer. My Epson printer has no problem. At work a Brother printer also works fine.

I've heard, HP printers work well with Linux. Maybe that was so in the past, but not now. There is some kind of protected software which Ubu does not have.

hplip-3.18.7.run seems to work, installs the proprietary software and prints a test page. I thought, everything OK now, but a pdf will not print.

Maybe Ubu 18.04 is just too young!
 
Old 09-17-2018, 09:16 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Pedroski View Post
I only have Ubuntu at home, no other distro. I'm not an expert, and Ubu is relatively easy to use.

I had no problem doing this in 16.04.

The pdfs are not protected, I generated them.

Whatever default pdf reader comes with Ubu 18.04, that's what I have, seems to be Document Viewer 3.28.2

Also, this is only a problem with the HP printer. My Epson printer has no problem. At work a Brother printer also works fine.

I've heard, HP printers work well with Linux. Maybe that was so in the past, but not now. There is some kind of protected software which Ubu does not have.

hplip-3.18.7.run seems to work, installs the proprietary software and prints a test page. I thought, everything OK now, but a pdf will not print.

Maybe Ubu 18.04 is just too young!
So, just to confirm, you printed exactly the same pdf on exactly the same printer when you had Ubuntu 16.04 but it worked?
 
Old 09-17-2018, 05:17 PM   #6
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Yep, I print a lot of pdfs generated by a multiple choice marking program, Formreturn, answer forms for 7 classes nearly every week.
 
Old 09-17-2018, 05:52 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
I would recommend checking the CUPS error_log (/var/log/cups/error_log) after sending a PDF print job to the HP printer. First, CUPS should be put into debug mode with

Code:
sudo cupsctl --debug-logging
then send a print job and examine the log (with an editor). It's likely to contain lengthy output, so if you need help understanding it consider copying the content to https://pastebin.com/ and share the link to it here.
 
Old 09-17-2018, 07:29 PM   #8
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks!

I just tried to print 1 page pdf, did not work, now the printer status light is flashing and the printer is unusable. I called this print queue hplaser1025, so I looked for that in the error log. The whole error log is too long to paste, exceeds the permitted size.

https://pastebin.com/DQg6Nsxk

How do I turn off the debug-logging please??
 
Old 09-17-2018, 07:36 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Often a good idea to delete the exiting log before starting these diagnostic exercises. It will get recreated the next time CUPS starts. Or just identify the relevant print job (or time stamp) and examine just that section.

To turn it off again do
Code:
sudo cupsctl --no-debug-logging
 
Old 09-17-2018, 07:37 PM   #10
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Unfortunately, the snippet you shared isn't complete for the print job concerned. I want to see filter-related information and that is not there.
 
Old 09-17-2018, 07:55 PM   #11
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Sorry about that.

I tried to print again. I waited until my computer clock got past 08.41 to 08.42, then clicked print. The error log shows 08.42.05 I copied the next 10 seconds, up to 08.42.15.

Maybe that will give you a clue?? The error log is still a lot longer!!

https://pastebin.com/6YAZ5FpH
 
Old 09-17-2018, 08:25 PM   #12
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Hi again and sorry to bother you with this!

I cleared all jobs in the print queue.

I started a new print job at [18/Sep/2018:09:16:04 +0800] then quickly copied the error log to the end, because it just keeps getting longer!

Just for things like this, I have 2 printers at home and 2 in the office. I have found, if you rely on one printer, just when you really need it, it balks!

https://pastebin.com/dwsLfFLv

One fine day, after an update, I'm sure this will work again! Like I said, the latest Ubu is a bit iffy!
 
Old 09-17-2018, 08:42 PM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
For future reference, the error_log can be deleted with
Code:
sudo rm -f /var/log/cups/error_log
then restart CUPS and it should get recreated.


Anyway, the filter chain is present in your last posted log...
Code:
D [18/Sep/2018:09:16:04 +0800] [Job 246] 3 filters for job:
D [18/Sep/2018:09:16:04 +0800] [Job 246] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [18/Sep/2018:09:16:04 +0800] [Job 246] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [18/Sep/2018:09:16:04 +0800] [Job 246] hpcups (application/vnd.cups-raster to printer/hplaser1025, cost 0)
...and from examining that I can see that it is hpcups that fails further down....
Code:
D [18/Sep/2018:09:16:04 +0800] [Job 246] prnt/hpcups/HPCupsFilter.cpp 644: DEBUG: SHIVA inside the while loopprnt/hpcups/HPCupsFilter.cpp 648: DEBUG: imageProcessorStartPage failed result = 2
This error is the same reported in this recent Slackware thread so likely a regression with HPLIP itself (the hpcups backend is part of HPLIP).

For now, I would try downgrading hplip.
 
1 members found this post helpful.
Old 09-18-2018, 01:52 AM   #14
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Work around: we have an old laptop here at home with Win 7. I installed the hp software from the cd which came with it. At least, if I want to print a pdf, I can plug a usb stick in and print from there!
 
Old 09-18-2018, 02:20 AM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Whatever works for you

If it were me I would be reverting to HPLIP v 3.18.4
http://ubuntuhandbook.org/index.php/...18-04-support/
 
1 members found this post helpful.
  


Reply



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
[SOLVED] lp doesn't print file to pdf directory after installing cups-pdf using synaptic mrcj Debian 1 10-09-2013 07:18 PM
Firefox print to PDF (and CUPS) only saves the first 1 or 2 pages to PDF ziphem Linux - Software 1 05-08-2011 10:43 PM
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:32 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