escape seq. in reports

NF 2.01.xx Windows NT4.0 I try to print escape sequences in reports using the following code: ESC : Char ESC := 27; command := FORMAT(esc) + ‘&l4H’; The variable command is placed in a textbox. What all PLC printer drivers do is to replace the by a blank : “&14H” —> " &14H" (Can be seen by printing to a file.) What’s wrong?

If you are creating a graphical output, then Esc codes makes no sense to your printer. Standard printing under Windows is graphical. For special purpose printing, it may help to create a new printer as a Generic, Text Only printer. Then no graphical formatting is done and your Esc sequence should be passed. However, you have to do all settings (papersize, font, size, etc) yourself as well. Just like in those (good?) old days :slight_smile: John

Are you sure that even with a generic printer driver, non-ascii characters are not stripped from the output? I remember a conversation along these lines before & someone suggested the use of a 3rd party printer driver which solved the problem

Try to use Epson OPOS driver (speciali designed to handle bar code printer, slip printers etc.) You can send a special “printable” char and it is converted to ESC sequnce and sended directly to driver.

You can use print servers from Axis. They can do string substitution which makes it possible to invent Your own escape codes and let the print server translate them to real ones.

Lars - Sorry to be dumb, but how exactly does this command substitution work with the Axis software?

Nothing dumb with that question. Let’s say that You put a label at the top of Your report with the text “Invoice”. You can then configure the print server to watch out for the string “Invoice” and tell the print server what to substitute it with. The advantage with this method is that the ESC-sequense will be performed where it should be: inside the PCL-job. The configuration is quite easy. The print server has a tiny integrated “web server”. You just browse in to the print servers IP-adress with Your browser and configure the string substitution in the web interface using hex values. There might be other solutions as well, but this one i know works. The only problem we have seen is that the model we tested made it impossible to maintain the ram-drive in the HP-printer using HP’s administrative tools. This is intresting if You wan’t to work with overlays. Good luck

Am I right in assuming that you need an Axis printer server for this to work (I don’t have one) Ps. As an aside, have you noticed that the Generic Printer properties in Win98 allow you to code your own basic escape sequences.

Yes You’re right. It’s that little Axis box that does the trick

You can also use the Printserter printer driver. This is a PCL4 printer driver but you can put in pcl escape codes in your report and they will be send to the pcl printer as such. Big advantage is that you can dowload this driver from internet and al basic pcl (form size, bold, italic bitmaps etc) are supported and you can add codes to pe. change the input and output bin. Rgds Benny Giebens