LinuxQuestions.org
Visit Jeremy's Blog.
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-04-2004, 01:30 AM   #1
blainehilton
Member
 
Registered: Dec 2002
Location: Portage, IN, USA
Distribution: Fedora
Posts: 34

Rep: Reputation: 15
Printing one line at a time


I am trying to setup a dot matrix printer for the first time directly to a machine running Fedora Core 2. After setting it up with the GUI for CUPS I am able to run "lpr file" and it prints, however it feeds the whole page through.

My application requires me to use a script to send output one line at a time. How can I make the lpr command just print the file and then go to the next line (advance page one increment) to wait for the next time the script runs?

In the options I've tried checking and unchecking both the Send Form-Feed (FF) option and thed Send End-of_transmission (EOT) option without luck.

I am using a 9pin impact printer, Panasonic KX-P1150.

Any help would be greatly appreciated

--
Thanks
Blaine
 
Old 09-04-2004, 02:07 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
I've never tried to do such a thing with Cups. You can do it with the print utility enscript, which allows you to specify how many line per page, among other things. Check out man enscript for more info.
 
Old 09-04-2004, 02:26 AM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Could you include in your script that the line is appended to a file, and after X number of lines, lpr is run? Clear file, lather rinse repeat?
 
Old 09-04-2004, 01:25 PM   #4
blainehilton
Member
 
Registered: Dec 2002
Location: Portage, IN, USA
Distribution: Fedora
Posts: 34

Original Poster
Rep: Reputation: 15
Enscript looks like it has promise, I will try working with the various switches.

As for the script, I have a PHP script that each time it is ran needs to print one line. Like a logger that logs to a printer instead of a file. I am looking for a command I can run that will let me print some output on a line. Then the next time the script calls the command it will print the next line, without advancing to the next page.


--
Thanks
Blaine
 
Old 09-04-2004, 07:18 PM   #5
blainehilton
Member
 
Registered: Dec 2002
Location: Portage, IN, USA
Distribution: Fedora
Posts: 34

Original Poster
Rep: Reputation: 15
I believe I have gone through all of enscript's command line switches without luck.

After doing a couple more hours of reading I believe that the system is sending the printer a command to do a form feed, which I want to stop. In the CUPS GUI there is an option to send a form feed command or not and I made sure that was unchecked along with end of transmission. That did not work. I tried it again with sending an end of transmission and it still didn't work.

I am at a loss here. I have tried printing now using the commands; lp, lpr, and enscript all without luck.

I have also read the printer manaul a dozen times and can't figure anything new out, except that it can emulate an Epson printer, the Epson FX-850, however changing to this one did not help either.

I looked through the /etc/cups/ files and the /etc/printcap file and didn't see anything that lit a light bulb.

Any other ideas would be quite helpful !

--
Thanks
Blaine
 
  


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 line numbers? fisheromen1031 Programming 1 07-27-2004 03:19 PM
command line printing rb3ng Linux - Newbie 3 04-22-2004 01:35 PM
Printing a line number gummimann Programming 2 11-06-2003 07:09 AM
Command line printing? HappyDude Linux - Software 2 10-25-2003 02:00 PM
Printing a specific line charlie123 Linux - Newbie 2 02-10-2003 11:59 AM


All times are GMT -5. The time now is 02:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration