printf("/033E") 
Author Message
 printf("/033E")

Hello,

Anyone with intimate knowledge of HP II laser printers out there?
I am working on a printer language translation project, and have been
brought on to fix some problems.  The little C application these folks
have is replacing the command for RESET from the old printer lang in the
stream with printf("/033E").

Presumably, this tells an HPII D Laserprinter :"clear out temporary fonts,
clear out temporary macros, and revert to user default environment".

In practice, on the development system I am working on, and on at least one
other, this causes the printer to cease returning to the left margin after a
carriage return when fed straight text.  Amusing, but you run off the page
very fast, so I'd like to discourage it.

The translation program seemed to work fine until it was compiled under SCO
3.0...  I have a couple of suspicions:

1)  I am a novice when it comes to setting up a printer under UNIX...
assuming the character string being sent to the printer is correct and it is
arriving intact, and does actually represent a Reset command that reverts it
to some default behaviour, is it possible that this really *is* the default
behaviour?  If it is, how do I change it?

2) The string being sent is wrong... unfortunately the people I have
contracted with have yet to provide me with technical support and/or
detailed HP printer language reference manuals for developers.

3) The C program is translating the string incorrectly, not behaving the
same under SCO as it did on the previous platform (AIX, maybe?  Sorry, not
sure at the moment)

4) SCO doesn't like whatever "/033E" is and is altering it.  That's a straw
clutch, but I'm not even sure what "/033E" is.  Am I looking at some sort of
non printable control character?

Any help or votes attached with explanations are welcome.  I'm a bit out of
my element, and am not used to hardware difficulties, Unix at the sys admin
level, and the problems associated with porting portable programs from one
platform to another.

~Peter



Tue, 16 Oct 2001 03:00:00 GMT  
 printf("/033E")

Quote:

> Hello,

> Anyone with intimate knowledge of HP II laser printers out there?
> I am working on a printer language translation project, and have been
> brought on to fix some problems.  The little C application these folks
> have is replacing the command for RESET from the old printer lang in the
> stream with printf("/033E").

> Presumably, this tells an HPII D Laserprinter :"clear out temporary fonts,
> clear out temporary macros, and revert to user default environment".

That should be:
  printf("\033E");  Which is the Esc E command for reset.
[snip]

Quote:
> 1)  I am a novice when it comes to setting up a printer under UNIX...
> assuming the character string being sent to the printer is correct and it is
> arriving intact, and does actually represent a Reset command that reverts it
> to some default behaviour, is it possible that this really *is* the default
> behaviour?  If it is, how do I change it?

There are some features and modes that do not revert to a default state upon
reset.  You will need to see the technical manual for your printer.

Quote:
> 2) The string being sent is wrong... unfortunately the people I have
> contracted with have yet to provide me with technical support and/or
> detailed HP printer language reference manuals for developers.

Try this:
PCL5 Printer Language Technical Reference Manual
HP Part Number 33459 - 90903

Quote:
> 3) The C program is translating the string incorrectly, not behaving the
> same under SCO as it did on the previous platform (AIX, maybe?  Sorry, not
> sure at the moment)

You need to ask in a Unix newsgroup for this one.

Quote:
> 4) SCO doesn't like whatever "/033E" is and is altering it.  That's a straw
> clutch, but I'm not even sure what "/033E" is.  Am I looking at some sort of
> non printable control character?

In the C++ language, escape codes use a backslash '\' not a forward slash '/' to
denote escape sequences.
The character '\033' is the ASCII Escape control character, and it is not
printable.

Quote:
> Any help or votes attached with explanations are welcome.  I'm a bit out of
> my element, and am not used to hardware difficulties, Unix at the sys admin
> level, and the problems associated with porting portable programs from one
> platform to another.

> ~Peter

All the PCL printer commands start with an ASCII escape character followed by
command letters and numbers.

--
Thomas Matthews



Tue, 16 Oct 2001 03:00:00 GMT  
 printf("/033E")
: >Isn't <ESC> 027 ?
: >033 is !
: >Reset = <ESC>E = 027 069  (or 1B 45)

: 0nnn indicates an octal value.

: 033(base 8) == (3 * 8) + 3 == 24 + 3 == 27 (ASCII <ESC>)

: What you put, 027, is not <ESC>:
: 027(base 8) == (2 * 8) + 7 == 16 + 7 == 23 (ASCII Ctrl-W, I think)

Sorry, I was having flashbacks to all the thousands of /027's I typed in
Lotus printer setup strings in the pre-Excel era. I have smacked myself on
the wrist, further punishment is not required.

Stephen

: Kevin



Fri, 19 Oct 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. printf("%d",1.0/3*3)

2. printf("%g") to 3 sig figs

3. "implicit declaration of function printf"

4. Behaviour of printf("[%.0g]",1.0)

5. "printf()" hangs machine

6. printf("%x",string_buffer); - Output question

7. C source code for "printf"

8. "printf" question

9. printf("%x",float) is ZERO??

10. printf("%")

11. how does printf("%#06x", 0x80) look?

12. Chapter and verse on printf("\n")

 

 
Powered by phpBB® Forum Software