Unix Printing issue


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Unix Printing issue
# 1  
Old 08-30-2010
Unix Printing issue

I am currently struggling with attempting to print text files on a SCO 5.0.7 server to a network printer. The printer is an Hp LJ P2015dn There is an existing printer set up, and when I do a:
Code:
lp -d myprinter /etc/hosts

the first line of the hosts file is all that prints. I even attempted to use "netcat" to send text directly to the printer using:
Code:
cat /etc/hosts | netcat -h myprinter -p 9100

I continue to get the same results, only the very first line in the hosts file will print. I have attempted this on other text files and still the 1st line is all that prints. Please help.


Andy

Moderator's Comments:
Mod Comment Use code tags please.

Last edited by zaxxon; 08-30-2010 at 12:18 PM..
# 2  
Old 08-30-2010
man lpadmin...
# 3  
Old 08-30-2010
Man pages read ad nausium

I am looking for someone who has experienced the problem of only a single line of a text file being printed. Obviously I tried lp first to print to this network printer, and it should just work, as in my first example. I then tried netcat which is a program that is basically cat but to a network port on a print server, which removes the Lp world from the printing process completely with the same results.
# 4  
Old 08-31-2010
I'd expect any modern unix O/S to come with a generic HP Laserjet model script and instructions for setting up network printing.


General answer to your question:
It's probably trying to print the whole file on one long line and truncating.
In general you need process the print file into a format suitable for printing. For example changing from the unix terminator of just <line feed> to the printer line terminator of <carriage return><line feed>. I would expect this to be the default option when correctly configuring a unix printer.


Sorry, not used SCO unix for over 10 years and even then I used "lpr" not "lp".
# 5  
Old 09-02-2010
First of all

Code:
uname -a -v

Is this HP-UX, Solaris or what ?
# 6  
Old 01-09-2011
Quote:
Originally Posted by asamon
I am currently struggling with attempting to print text files on a SCO 5.0.7 server to a network printer. The printer is an Hp LJ P2015dn There is an existing printer set up, and when I do a:
Code:
lp -d myprinter /etc/hosts

the first line of the hosts file is all that prints. I even attempted to use "netcat" to send text directly to the printer using:
Code:
cat /etc/hosts | netcat -h myprinter -p 9100

I continue to get the same results, only the very first line in the hosts file will print. I have attempted this on other text files and still the 1st line is all that prints. Please help.


Andy

Moderator's Comments:
Mod Comment Use code tags please.
I suppose that you have solved this problem by now, but for the benefit of others:
You need to add and escape sequence to the beginning of the print file, since it seems not to be in the driver (model file).
Add "<esc>&k2G" to turn line feed into carriage return linefeed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Printing issue with AIX 7.2

Hello group. I recently upgraded my company's server from an IBM P520 w/AIX 5.1 to a new Power 8 w/AIX 7.2. The old server used serial printing and we turned off the print queing feature. We did this because we have many custom forms and did not want a que/spooling situation where a print job... (1 Reply)
Discussion started by: Len Davis
1 Replies

2. Solaris

Solaris Printing Issue

Message from lp on sunnyD (???) ... Subject: Problem with printer (name) The printer (name) has stopped printing for the reason given below. Fix the problem and bring the printer back on line to resume printing. The reason(s) it stopped (multiple reasons indicate repeated attempts): ... (2 Replies)
Discussion started by: sydalackk
2 Replies

3. Solaris

Network Printing issue

I have network printer registerd in solaris environment. When I issue print, it prints banner page. The issue printer is registerd in Print server which is running on Linux environment. So when I issue print in Print server, it doesn't print banner page as banner settings are made to turn off It... (6 Replies)
Discussion started by: Sunil Koya
6 Replies

4. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

5. Solaris

Printing Issue On Solaris 10

Synopsis: Solaris 10 SunFire v880 with two networked HP laser printers set up through HPPI. Test page will print through HPPI but can't print to them us the lp command. When using the lp command it just hangs and causes the Samba process to fail. We have a SunFire v880 running Solaris 10. $$... (1 Reply)
Discussion started by: KenLynch
1 Replies

6. Shell Programming and Scripting

date printing issue

Hello folks Below command shows current date echo `date +%Y-%m-%d` 2010-04-21 How to show one day old date, i want see like 2010-04-20 (1 Reply)
Discussion started by: learnbash
1 Replies

7. SCO

Local Printing Issue in SCO Unix OS 5.0.5

Folks, Have a SCO OpenServer 5.0.5 legacy box on site that has run our legacy ERP system for about 15 years now. Primarily uses an Okidata 321 ML Turbo line printer (defined as 'printer') attached to the system's parrel port at /dev/lp0. System primarily operates as a terminal server with... (2 Replies)
Discussion started by: SystemsAdminAS
2 Replies

8. Shell Programming and Scripting

line feed printing issue

I am have an issue with the carrige or line feed chars showing up on info converted to a pdf file from a Orcale tool. Any direction would be appericated. ex. John doe 12435 1 232344 1 Jane doe 12435 1 424343 1 when should be like this John doe... (1 Reply)
Discussion started by: sherrod6970
1 Replies

9. UNIX for Dummies Questions & Answers

Printing Issue

I have a printing issue I need some help with. I have a printer that will advance a sheet of paper prior to printing a print job. This is not a banner page, it's just a blank page. The O/S is AIX. I know that in SCO and Other Unix's there are printer interface files that more or less tell the... (1 Reply)
Discussion started by: Docboyeee
1 Replies

10. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies
Login or Register to Ask a Question