Solved

Print to file in Unix

Posted on 1997-12-14
4
587 Views
Last Modified: 2013-12-06
In Microsoft Windows, it is possible to use the "print to file" option when printing. In this case, the binary data, including printer control codes, is written to a file instead of being sent to the printer.

I want to do this in unix (ideally Hewlett-Packard unix), in order to see what control codes are being sent to the printer.

NOTE: I want to see the printer control codes added by the unix printer driver, so simple file redirection (using the ">" character) will not work.
0
Comment
Question by:mkellerman
  • 2
4 Comments
 

Author Comment

by:mkellerman
ID: 2008330
If you know any way to see the printer control codes added by the unix printer driver, this will solve my problem.
0
 
LVL 3

Accepted Solution

by:
Jackie071497 earned 200 total points
ID: 2008331
Many printers have the feature of hexa-dump mode.
Under this mode, printer will output each byte received to hexa
value, no matter what it is data or control code.
I called it as "printer debug mode" and it is hardware-level
debuging. It works for DOS, Windows, OS2, Unix, ......
The only factor is "You can print data to printer under your OS".
Maybe you should check your printer manual how to setup hexa-dump
mode. If failed, tell us about your printer style.

0
 
LVL 1

Expert Comment

by:cemaylor
ID: 2008332
There is a second option here, which is to temporarily disable the system spooler.

The result of this on many UNIX systems is that the printer will accept the job, and create the output file, but as the spooler is not running it will maintain a file in the jobs directory.

You could then hd (hexdump) the file to see the codes, or hit it with an editor or ??

Remember to reenable the spooler when done.


0
 

Author Comment

by:mkellerman
ID: 2008333
Hello Jackie and Cemaylor:

Thank you for your suggestions. I have passed them on to the engineer in the location where the printer is and am waiting for him to report on the results of applying your 2 suggestions.

At that time, I'll grade your answers.

Thank you for yuor help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sudo logging 5 109
FTP on FreeBSD server 2 152
how to check for shares on HP-UX 1 71
Linux : can't create transaction lock error 1 83
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question