ICE

Please login or register.

Login with username, password and session length
Advanced search  

News:

ICETCP.PRO and ICETCP.PLUS are compatible with Windows 11!

Author Topic: Debugging transparent printing  (Read 4017 times)

Bob

  • Administrator
  • Ice Artist
  • *****
  • Posts: 1607
Debugging transparent printing
« on: January 07, 2008, 11:38:31 am »


Transparent printing is how an application prints with a serial connection.

The way it works:

1) On the unix side either the application directly outputs the required escape sequences (usually called pass-thru or transparent print in the applcation) OR a print spooler in conjunction with a multiport serial board that has transparent print support outputs the codes.

2) The PC side using ICE.TEN or ICE.OFFSITE in the local print setup has selected the windows printer in which the output is desired along with the print method (normal, direct or raster).

3) The unix side via either the app or the multiport software, sends an escape sequence to Dejawin on the PC that tells Dejawin that the characters to follow go only to the printer, this is called the print on sequence. When the unix side is finished sending the print job it sends a second escape sequence called the print off sequence.

4) These sequences are different for different terminal types so it's crucial that both Dejawin and the unix side and the application agree on the terminal type (note that in ICE.OFFSITE if you are using the autodialer, the autodial terminal type overrides the general terminal type set in Dejawin!

5) To troubleshoot transparent printing you can create a script on the unix machine to simulate what the app or multiport serial board transparent print support does.

6) If you are using any WYSE terminal type, type the following from the unix shell prompt!


cat >lpf
#!/bin/sh
echo "\033d#\c"
cat $1
echo "\024\c"

then type a control-d to write out the lpf batch command

next type:
chmod 755 lpf

to make lpf executable

Then do:
ls | ./lpf -


You should see a listing of the unix directory (probably stairstepped) on your PC printer. If you do, then transparent print is working fine and if you are having a problem, it's on the unix side. If you get no output, check your PC side terminal type and printer settings in Dejawin.

NOTE: if you are using a non-wyse terminal type, the two "echo" lines in the example above should be replaced with:
echo "\033[5i\c"

and
echo "\033[4i\c"


Finally, if you are using linux or the bourne shell the echo command needs the "-e" argument so in the example above you would use instead:
echo -e "033[5i\c"

and
echo -e "\033[4i\c"

« Last Edit: January 07, 2008, 12:56:41 pm by Bob »
Logged
 

Page created in 0.045 seconds with 20 queries.