LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-19-2019, 12:59 AM   #1
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99
Blog Entries: 1

Rep: Reputation: Disabled
Printing pdfs


I use Debian 10. I have just had to re-install and my Brother printer MFC-L3770CDW will no longer print pdfs. Before the re-install it did. I have had some problems with 10Alaric
 
Old 09-19-2019, 03:28 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Is this just from a particular application?

If you print a pdf file from a terminal, does that succeed?

Code:
lpr path/to/filename.pdf
*You might need to ensure the printer is explicitly set as default printer first.
 
Old 09-19-2019, 04:03 AM   #3
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
No it doesn't. It requires a destination and does not recognise Brother-MFC-L3770CDW. Nor will it accept lp, it needs lpr though lp is in user bin



Alaric
 
Old 09-19-2019, 04:44 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Please show output of
Code:
lpstat -t
then do something like
Code:
lp -d <queuename> <file.pdf>
or
Code:
lpr -P <queuename> <file.pdf>
 
Old 09-19-2019, 04:47 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Nor will it accept lp, it needs lpr though lp is in user bin
Then make an effort and specify any required paths etc

The man pages are your friend...
Code:
man lp
Code:
man lpr
 
Old 09-19-2019, 02:24 PM   #6
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
lpstat returns "scheduler is running
no system default destination
device for MFCL3770CDW: usb://Brother/MFC-L3770CDW%20series?serial=E79065A9N394365
MFCL3770CDW accepting requests since Thu 19 Sep 2019 13:35:51 NZST
printer MFCL3770CDW is idle. enabled since Thu 19 Sep 2019 13:35:51 NZST"

The command 'lp' returns no such file or directory. /usr/sbin is not in the PATH and 'export PATH=$PATH /usr/sbin returns '/usr/sbin is not a valid identifier' even though cd has changed to that directory. I tried ~/ and ./ with no luck.

Debian 9.9 wrecked my partitioning and lacked essential programmes. 10 has returned ocrfeeder which I need but was a swine to install and has kept tossing up problems. I have always manually partitioned because I found auto partition skimped on either root or boot, I forget which. I had two goes at manual partitioning only to find that 9,9 wouldn't install on manual partitions and I had to use LVM if that's the correct name. I know nothing about LVM and had to let the installer set it up.

I tried Mageia since someone suggested Libre Office worked well. On 10 Libre Office wrecks my formatting when saved and re-opened. It inserts quite arbitrary margins which wrecks the whole file. I was not able to install Mageia but the attempt lost me Debian because it changed Grub file and I had to re-install Debian 10. Before that the printer worked. Since than installing the printer driver has been a problem.

I am in /usr/bin. lpr -P returns 'no such file or directory' lp and lpr appear to be in /usr/bin

Computers are great when they work

Regards

Alaric
 
Old 09-19-2019, 03:16 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Just to verify your printer is connected to your computer using USB?

The command syntax to print a document from the command line without a default printer configured is:

Code:
lpr -P MFCL3770CDW my_document.pdf
or
lp -d MFCL3770CDW my_document.pdf
This assumes that your terminal current working directory is in the directory where my_document.pdf is located otherwise use its absolute path. A users environment path should include /usr/bin.
 
Old 09-19-2019, 04:07 PM   #8
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Yes it is connected by USB. Neither lp nor lpr are accepted as commands though there is a manual for both. Sorry but Debian 10 is a mess.

Regards,

Alaric
 
Old 09-19-2019, 06:28 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I installed debian as a virtual machine and it seems find to me... I have a Brother HL-L2360DW and while not quite the same I downloaded the driver package from Brother's website, ran the installer and it worked fine.

The correct syntax to add a path to the path environment variable is:
export PATH=$PATH:/usr/bin (I did not see the : (colon) in your previous post.

Just for curiosity have you tried running the lpr command using its absolute path i.e.

/usr/bin/lpr -P MFCL3770CDW my_document.pdf

If you are running a desktop have you tried opening the PDF from the file browser and tried printing?

From a web browser enter the address
localhost:631

The cups web page should be displayed and select the printers menu. Selecting printers displays the printer queue.
Select the printer queue name which is a link.
Select the Maintenance pulldown menu and click on print test page.
Does a test page print?
 
Old 09-19-2019, 09:53 PM   #10
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Yes I ran it from /usr/bin/lpr. It rejected lpr command not known

I can't print from the open file. There is no print queue under MFC3770

A test page does not print.

Installing the printer from the printer installation programme generates a number of warnings as it can't find several of the files and folders. Reading Deepin is difficult because of the colours. I use it in preference to Xterm because I can copy to it and Xterm does not appear to allow copying.

Loading to Gimp will only print one page at a time and takes an age. I have a 12 page pdf which I need urgently.

I might try downloading 10 again and installing it and downloading the printer installation file again.

I was warned that HP is the only satisfactory printer but I couldn't find one for my needs and they are about twice as expensive as anyone else.
 
Old 09-20-2019, 05:55 AM   #11
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I have re-installed Debian from a new download. I still can't print pdfs. I cannot now print them from Gimp. Inspecting 'jobs' in cups shows one stalled job some days ago but no new jobs have appeared and I can't even print a test page.

The command you suggest above crashes with an error message that the file to be printed does not exist though it is sitting in front of me on the file manager. It is the same whether I give the whole chain from 'home to the file name or whether I change to the directory.
 
Old 09-20-2019, 06:05 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
lpr and lp command are actually cups commands and since there is no printer queue on its web page means cups is messed up somehow.

I was expecting the file to be opened in a pdf viewer like ocular or evince versus gimp.
 
Old 09-20-2019, 06:12 AM   #13
AlaricWood
Member
 
Registered: Apr 2014
Posts: 99

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
It opened in ocular. Where do I go now? I am getting a bit desperate.
 
Old 09-20-2019, 06:24 AM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Select print from the ocular menu.

Not being able to print a test page means there is still a cups problem and or the printer has not been installed correctly.
 
Old 09-21-2019, 06:06 AM   #15
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by AlaricWood View Post
Reading Deepin is difficult because of the colours. I use it in preference to Xterm because I can copy to it and Xterm does not appear to allow copying.
For future reference:

You should be able to copy text from an Xterm by:
  1. Placing the cursor at the point in an application where I want to paste text. Then,
  2. Highlighting the text in the xterm that you wish to be pasted and then,
  3. Making sure the target window has focus and then,
  4. Doing a Ctrl-middle-mouse-button.

I find it helps to a.) have the window focus follow the mouse w/o having to click so I don't accidentally unselect the text I want to paste by clicking at the wrong place/time and b.) have a three-buttom mouse or have enabled emulation for that type of mouse (probably via chording). In times of yore, all mice had three buttons. Then Macintoshes came out and the world decided split the different and went with only two, making Unix users scramble to re-write their mouse drivers so they could paste. (I kid.)

It may seem a bit awkward but the method came about before cut-n-paste was pretty much standardized to be Ctrl-C/Ctrl-V (for most GUI applications) or Ctrl-Shift-C/Ctrl-Shift-V (in terminals like Konsole). You may need to combine those two methods depending on the source of the text and the target for the paste (i.e. Konsole->LQ: Ctrl-Shift-C followed by Ctrl-V) but when using an Xterm, the method I described above (using the middle mouse button) should work.

If you find xterms easier to read I'd play around with the cutting-n-pasting for a while so you have an easier time when problems arise and you are trying to supply command output. Alternately, you issue the command and save the output into a text file:
Code:
$ command-giving-you-trouble 2>&1 | tee command.log
Then you could either edit the log file using an editor that's easier to cut-n-paste from or attach it to your post.

HTH...
 
  


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
Printing empty PDFs with LaserJet 4000 davesbedroom Linux - Hardware 2 12-17-2005 01:24 AM
Printing empty PDFs with LaserJet 4000 davesbedroom Linux - Hardware 0 12-16-2005 09:52 AM
printing PDFs with CUPS sfrdll Linux - Software 0 07-24-2004 04:35 PM
printing pdfs irvken Linux - Software 1 05-20-2004 06:50 AM

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

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