Setting printer paper length using unix commands


 
Thread Tools Search this Thread
Operating Systems HP-UX Setting printer paper length using unix commands
# 8  
Old 12-22-2011
My version of the basic technique is in post #3.

How is the Windows printer configured? Does it have the Epson driver loaded and a configuration screen where you can change the page size? Or is it just configured as a dumb network printer?

Diagnostics:
Your printer should have a diagnostic mode where it prints all escape sequences rather than executing them. This is one way to find out if Windows is sending setup escape sequences to the printer - and what they are.
This User Gave Thanks to methyl For This Post:
# 9  
Old 12-22-2011
You should also add an additional escape sequence to return the printer to its power on settings at the end of the job, otherwise, every job will have to set its own page length.
Try setting the printer as a Generic text only printer within XP so that the Windows driver does not add additional escape sequences.

Code:
( echo "\0033C\0041\c"
 cat fileName
echo "\0033@\c"
 ) | lp -d printername    ....etc

This User Gave Thanks to jgt For This Post:
# 10  
Old 12-22-2011
Quote:
Originally Posted by methyl
My version of the basic technique is in post #3.

How is the Windows printer configured? Does it have the Epson driver loaded and a configuration screen where you can change the page size? Or is it just configured as a dumb network printer?
EPSON LQ 680 / ESC P2 driver is loaded and i am able to change the page size . Infact i am able to see lots of options. Have tried over different sizes like A4,A5 Letter , etc . Also in the printer DIP settings i am able to set the printer page length and other options like Perforation , etc. Have changed and tried all those combinations. But was still unsuccessful.

---------- Post updated at 07:52 PM ---------- Previous update was at 06:59 PM ----------

After executing the following command ,

Code:
( echo "\0033C\0041\c"
 cat fileName
echo "\0033@\c"
 ) | lp -d printername


i see an empty box which is the form feed character and "C!" printed along with the data.

It seems that the printer is not recognizing the code or maybe i am wrong somewhere .
# 11  
Old 12-22-2011
Looks like it is reading the escape sequence as "Esc C !" (i.e. taking octal 041 to mean character ! - not decimal 33).

Time to get hold of the manual for your printer. The first thing to check is what mode the printer is in.
(My codes came from an Epson LQ850+ manual and were used in a live script to print awkward sized labels).

I have had terrible trouble with this subject in the past because Epson marketed some printer model variants which responded to non-Epson control codes. (e.g. IBM codes) while they were trying to get market share. You can only tell from the part number.
This User Gave Thanks to methyl For This Post:
# 12  
Old 12-24-2011
Is there any difference in configuring the printer in unix server in LPR port and USB ?

How to identify whether the commands i execute from unix is properly received by the port and forwarded to printer?
# 13  
Old 12-24-2011
Quote:
Is there any difference in configuring the printer in unix server in LPR port and USB ?
Sorry but this question makes no sense whatsever. There is no such thing as a "LPR port".

Quote:
How to identify whether the commands i execute from unix is properly received by the port and forwarded to printer?
Get the manual for your printer and find out how to put the printer into diagnostic mode where it will print any Escape Sequences rather than action them.


There is a massive difference when a Microsoft Windows computer is involved. Personally I have not configured a "LPR" printer in the last 20 years (it is very old technology).
Nowadays we expect the printer to be directly connected to the network. When it is an old dot-matrix printer we expect it to be connected to the network via a HP Jet Direct box.
This User Gave Thanks to methyl For This Post:
# 14  
Old 12-25-2011
Merry Christmas Guys. Still i have alignment issues in printing. Will update the post once i get the solution. Any other suggestions please help. Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Setting up printer in AIX 6.1

Hi All, I have been trying to configure an HP laserjet printer on an AIX6.1 server through network as well as remote. This is the first time i am configuring a printer on AIX. I had been using smitty butwhile configuring, i am getting blank/stuck at "software to support the printer attachment... (10 Replies)
Discussion started by: Rockyc3400
10 Replies

2. Shell Programming and Scripting

How to check if printer is out of paper using perl script ?

Hello, I need to chack if the printer is out of paper, and send message to operator. I need to do this from perl script. The printer have mechanism to check if it have paper. However, the cups does not report "printer out of paper" when I remove the paper, and try to print. Is there any... (1 Reply)
Discussion started by: +Yan
1 Replies

3. UNIX for Dummies Questions & Answers

Setting Printer margins

Hi, I have Aix 6.1. Installed the Ricoh Unix print filter, to allow us to print to a Ricoh 5001. So I send text documents to the printer using the qprt command and set the print job finishing options using the Ricoh commands passed using -o options. Eg. qprt -Pfin200 -o collate=on -o text... (7 Replies)
Discussion started by: max5000
7 Replies

4. UNIX for Advanced & Expert Users

Printer setting in Solaris

I have Solaris-10 server and want to change default printer setting to Simplex (Instead of duplex, which is set currently). I am not able to see anything in conf file related to this setting. Please help (2 Replies)
Discussion started by: solaris_1977
2 Replies

5. Emergency UNIX and Linux Support

Change printer setting

I have Solaris-10 server and want to change default printer setting to Simplex (Instead of duplex, which is set currently). I am not able to see anything in conf file related to this setting. Please help. (1 Reply)
Discussion started by: solaris_1977
1 Replies

6. AIX

Setting up Printer

Hi All, This is katherine and I am kind of new to AIX and has got the following request to set up the printer. Can anybody guide me to fullfill the following request step by step. The request is as follows: "We have been asked to set up the following printer in Oracle: UNIX queue ... (1 Reply)
Discussion started by: katherine2008
1 Replies

7. AIX

Setting up Local printer AIX 5

Hi folks need some help here. We have a RS6000 running AIX. It is almost never used anymore, but we need to print off some data. I have a paralell printer conected to the parrallel port, but have no idea where to go from here. The printer was originall named named LP01. If the users telnetinto the... (2 Replies)
Discussion started by: prator
2 Replies

8. UNIX for Dummies Questions & Answers

Setting a HP printer under Solaris 9

Hello. I am trying to make work HP printer Deskjet 692C. I have Solaris 9 x86. I tried to use admintool: I choosed 'HP-printer' and 'Postscript filter' options. When I want to print something, instead of the text, the printer prints many pages of some kind of code or whatever... ... (1 Reply)
Discussion started by: Peter123456789
1 Replies

9. UNIX for Dummies Questions & Answers

setting up a network printer

Hello people, I'm attempting to setup a printer connection to a printer running off the NT printer server, but with little success. I'm using the admintool, go to ADD printers...where it offers 'local' and 'access to printer'. I have chosen the 'access to printer' option as i'm attempting to... (1 Reply)
Discussion started by: colesy
1 Replies
Login or Register to Ask a Question