Setting printer paper length using unix commands


 
Thread Tools Search this Thread
Operating Systems HP-UX Setting printer paper length using unix commands
# 15  
Old 12-25-2011
Code:
echo "\0033C\0041\c" >set33

confirm that file set33 contains 3 characters using a hex or octal dump program. Hex dump should look like 1b 43 21.
Do the same with the printer reset.
Code:
echo "\0033@\c">reset

If you have the gnu version of echo, will you have to use "echo -e" instead of "echo"
Change the unix printer script to:
Code:
cat set33 myprintfile reset |lp -depson

Change the Windows printer configuration to temporarily print to file. Send a print job to the printer, and examine the file using "debug"
This User Gave Thanks to jgt For This Post:
# 16  
Old 12-27-2011
Thanks Jack,
That commands were pretty useful . Got some clear idea . But i still find those datas also appended in the print file.
# 17  
Old 12-27-2011
Are there also escape sequences in the original print file? If so they will override whatever commands you prefix the file with. Can you save the original print file, and post the first 3 lines, and the last 3 lines?
This User Gave Thanks to jgt For This Post:
# 18  
Old 12-27-2011
The file looks like below .
The file starts with two line feeds at the beginning . The first three lines are

Code:
line feed 
line feed
                    065                                       13-Dec-2011

The last three lines for this page are

Code:
         P O BOX 46806 ABU DHABI
          
         ABU DHABI,          Abu Dhabi
[FF]

where [FF] form feed character is displayed as a Box .

There are multiple pages like this inside a single file. I need to print each page separately reading from the same file .
# 19  
Old 12-27-2011
Lets bypass all the intermediate processes.
Save the print file to disk.
Edit the file so that only two pages are printed.
Code:
cat set33 saved_print_file reset >testfile

Go to the XP machine.
Start a command prompt
FTP to the HPUX machine and login.
ftp>ascii
ftp>get testfile
ftp>quit
c:> copy testfile LPT1:
I am assuming that the printer is connected to the primary parallel port of the computer. Otherwise, use the appropriate device (LPT2:, COM1:, COM2Smilie
This User Gave Thanks to jgt For This Post:
# 20  
Old 12-27-2011
It is connected to a USB port . When i mention USB002(name of the port to which printer is configured) it is giving me an error( * Is not a recognized device). When i give the printer name instead of port name it is asking whether to overwrite the file with options as Yes /No/All . I have a doubt wherein it will overwrite any printer settings or just the datas in printer queue . (Coz the printer queue is empty right now and then also it is aking the same)
# 21  
Old 12-27-2011
Use the following
Code:
c:\>net use LPT1: \\mycomputer\myprinter
c:\>copy testfile LPT1:

where mycomputer is the name of the local computer, and myprinter is the share name.
This User Gave Thanks to jgt For This Post:
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