Operating System - OpenVMS
1825509 Members
1880 Online
109681 Solutions
New Discussion юеВ

pc emulator print to local print

 
Kelly Cox
Frequent Advisor

pc emulator print to local print

I am having trouble printing a job to a local printer using windows xp. The print job works fine if the printer is accessed via a VMS print que using ip.

The problem is all the escape sequences either disappear or are printed as raw text. The print job is sending landscape, underline, and compress escape sequences.

I have tried 3 different emulators and multiple models of HP laser printers and ink jets. The results are basically the same each time. If I send to the VMS queued printer the report looks correct. If I change the printer to be local the report is NOT compressed, NOT landscape, and NO underlines on the headings. The VMS output file is the same both ways.

I have tried turning off spooling on the windows side and told it to use direct printing.

Any help or suggestions would be highly appreciated.
19 REPLIES 19
Hakan Zanderau ( Anders
Trusted Contributor

Re: pc emulator print to local print

First a question.....
Why send the job through the PC if it works sending it direct to the printer ?

When sending the job through the PC, the printdriver will try to format the job......

You need to tell the PC to "don't touch !"

This can be done by using /PASSALL when printing the job on VMS.
Don't make it worse by guessing.........
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

i have users that do not have access to queued printers. They showed me the trouble and I am trying to find a solution. I can duplicate the issue in my office using a pc and emulator. To test and be sure it was not something in the VMS report output I tried sending from the same pc and same 3 emulators to different queued printers and it works fine.

Only when going from pc to local printer does it fail. I can even use the same printer i used when it went through a VMS queue and direct ip connection.

I am just hoping that some of you out there that use pc's a LOT have solved this already. I RARELY USE PC'S. Unlike this years april fools article....my desktop REALLY IS VMS 8.2.
Doug Phillips
Trusted Contributor

Re: pc emulator print to local print

Kelly,

So is your program using the print-controller escape sequences [5i and [4i to print locally? The emulator will respond to those, but it seems like the windows driver is then "eating" your imbedded setup and format sequences.

I've had some luck using the "generic" windows printer. This sometimes works and sometimes doesn't -- a typical Windows phenomenon.

The Reflection emulator that I often use has a "bypass windows print driver" check box that also sometimes works and sometimes doesn't, or sometimes it'll work for awhile and then fail. Just like Windows.
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

Yes, i am using the 5i / 4i sequences. they are working correctly.
Doug Phillips
Trusted Contributor

Re: pc emulator print to local print

Kelly,

Your problem is with the Windows driver, so you can either get the Generic driver to work, or use an emulator that can bypass the Windows print driver. There are probably other local-printing solutions, but they would likely involve converting the report into something your windows driver understands.

Doug
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

Thanks Doug, 2 of the 3 emulators I've tried have a flag for 'bypass windows driver'...but that did not help. I've tried latest hyperterm, smartterm, and qvt. I also tried basic windows telnet.
Doug Phillips
Trusted Contributor

Re: pc emulator print to local print

Have you added a Generic /Text printer on LPT1 and tried that? If you can't make that work, you could be fighting a losing battle.

I've moved all specially formatted reports that come from VMS off to networked printers because I couldn't rely on Windows printing. XP seems especially frustrating. You can buy print-server devices for less cost than the time you'll spend fighting Windows.

I have one client where we were doing exactly what you are trying to do by using the Generic /Text driver. That stopped working for some reason and we've never been able to make it work there again. I love troubleshooting and I'm pretty good at it but with Windows, the point of deminishing returns comes very quickly. I moved the reports to the network.

For years I did controller-port local printing with embedded PCL codes here at my desk using the Reflection "bypass printer driver" switch, but it stopped working reliably with XP. It sometimes works for awhile if I remove and re-add the printer using an older driver, then update the driver. The very-latest Reflection version might solve this, but I'm too cheap to spend the money since all of the VMS stuff works now. I never did get PowerTerm to print right.

There are print capture programs you can buy, Snagit comes to mind, but I haven't looked at them for years. You select that printer in your emulator and it captures the report, displays, reformats it, lets you save it or print it and so forth.

Your problem is caused by the way Windows handles printers. Maybe someone else has the magic answer.
Phil.Howell
Honored Contributor

Re: pc emulator print to local print

Have you tried...
Add a local printer, and create a new port for it of type "HP standard TCP/IP port"
Enter the printer ip address and a port name, it should create it using the RAW protocol.
Then you can try this with both the correct HP printer driver and with generic/text.

If that doesn't work, you could
Create a local printer on LPT1 generic/text
at a cmd prompt enter
NET USE LPT1: \\server\printer
then COPY LPT1:

Phil
Vladimir Fabecic
Honored Contributor

Re: pc emulator print to local print

I had a customer that wanted to print to local printer from PC terminal emulator (using local printer as standard output).
The only solution that worked was VRQ Reflection with option "bypass window driver". They also had esc sequences. Had to play a little bit with parameters butit worked.
The only problem was that Reflection is very expensive.
In vino veritas, in VMS cluster
Robert Atkinson
Respected Contributor

Re: pc emulator print to local print

I agree, Reflections isn't the cheapest option, but is by far the best.

You could easily write Reflections Basic commands to change the Reflections Print Setup settings to Landscape, etc, then send the text without any escape sequences involved.

Rob.
Robert Atkinson
Respected Contributor

Re: pc emulator print to local print

Sorry - should have said. Reflections Basic can be sent from the VMS host, e.g. :-

$!
$! ESC+"P2000;1{ calls Reflection Basic, needed for .connectionsettings syntax
$!
$ ESC[0,8]=%X1B
$ WRQ1=ESC+"P2000;0{"
$ ST = ESC+"\"
$!
$ write sys$output WRQ1+"Sub Main "
$ write sys$output " Application.ConnectionSettings = ""ExitAllowed FALSE""
$ write sys$output "End Sub"+ST
$!
Antoniov.
Honored Contributor

Re: pc emulator print to local print

Kelly,
I can't understand how you send data to local print :-?
You can do this in various ways:
a) Sending data to emulator via escape codes to printer (I guess this is you way)
b) Using lpr/lpd protocol (this feature works bad in windows)
c) Using pwprint in pathwork32

Reading previous messages, I think you send data to emulator and than emulator sends data to the printer. Don't forget, Windows takes a full control of printer queue; it uses a legacy image called EMF while you MUST send data directly to the printer.

At last but not least, you have to configure your emulator to send data to device (usually lpt1:) not to the print manager. Even if you load text driver, Windows print manager cut every line into 80 bytes!

I summarize:
1) Check if local printer is not host based driver. Read here for "host based driver" problem http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1016266
If yes, stop it.
2) If you printer is connected via USB, stop it.
3) Install msdos driver or enable msdos printing (e.g. most of HP LaserJet have two kind of drivers).
4) Open cmd (msdos command interpreter) on PC; type
dir > lpt1:
(where lpt1 is the really printer port).
5) If direct msdos print works, configure your emulator to send data to local device

I'm using several print model on different windows version. If you post exactly the informations about your PC, printer, etc. I can help you.

Antonio
http://it.openvms.org

Antonio Maria Vigliotti
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

Thank you everyone for your help and suggestions. I have tried all of these suggestions except buying Reflections. I have very little control over which emulator my clients IT departments purchase. I try to convince them to make the printers IP based so VMS can send directly, but that is not the issue here. It seems like these emulators are not able to bypass the windows driver even though they have a flag for 'direct printing'.
Antoniov.
Honored Contributor

Re: pc emulator print to local print

Kelly,
have you got Pathwork32?
Pathwork32 has a unsupportated printer server that can print from VMS to PC.

Antonio
http://it.openvms.org
Antonio Maria Vigliotti
Hakan Zanderau ( Anders
Trusted Contributor

Re: pc emulator print to local print

Kelly,

I took a closer look at your problem.....
It's NOT the printerdriver that causes the problem,.....it's the EMULATOR !

I tried two emulators, Pathworks PowerTerm and Hyperterm. Powerterm works like a charm, but not Hyperterm.

What do the files look like before and after the printdriver ?

My testfile looked like

[5i
&l1OThis should be printed LANDSCAPE
[4i

I stopped my local queue and typed the file in both emulators. Having a look at the files in the spooldirectory C:\windows\system32\spool\printers showed that Hyperterm stripps the -codes, but the file created by Powerterm looked like


&l1O
This should be printed LANDSCAPE

and that is why it printed OK !

Reflection is not the only solution,
PowerTerm is another.......
I consider changing emulator a workaround, not a solution.

I'll be back......

regards,

Hakan Andersson

As Antoniov mentioned, a possible solution could be to let VMS print to a shared windowsqueue.
Don't make it worse by guessing.........
Hakan Zanderau ( Anders
Trusted Contributor

Re: pc emulator print to local print

Kelly,

I found, downloaded and tested two more emulators ( AniTA & KoalaTerm ). Both worked with my testfile.........

regards,

Hakan Andersson
Don't make it worse by guessing.........
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

Thanks for everyones input. We have found 2 emulators that seem to work with THIS clients version of windows and patches. I think it really boils down to which version of windows will work well with which version of any emulator.....and it's a CRAP SHOOT. Back to REAL FUN...programming.
Kelly Cox
Frequent Advisor

Re: pc emulator print to local print

Thread closed.
Verne Britton
Regular Advisor

Re: pc emulator print to local print

I have had very good luck using a 3rd party commerical LPD server for Windows ... WinLPR.

I am just a happy customer and not associated with that company. WinLPR is a replacement for the Microsoft LPD routines and will accept incoming LPR jobs ... I send jobs to it from VMS and Unix/Linux just fine.

It probably is overkill for your situation, but does work reliably for me; it allows you to make any number of virtual queues for incoming jobs to target, each pointing to the same or different physical Windows print queues (local or networked) and each virtual queue can have a different header prefix (for Linux output, just like a setup module in VMS).

In addition, the use of another Windows app may be a complication you wish to avoid ...

See http://www.alixoft.com for details (again, I'm just a very happy customer; $25 cost for one copy, see website for more pricing).

Also I just found an old email from 1996 where I tested and recommended to my remote users they buy SmarTerm from Persoft (now www.esker.com) for passthru remote printing from VMS (using the [5i/[4i ESC sequences) ... but it too may be expensive just like Reflections (obviously the product has evolved since 1996 :-) ).

Verne