Link to home
Start Free TrialLog in
Avatar of AdminMonkey
AdminMonkey

asked on

Trouble Printing from DOS programs in XP Mode

Having trouble printing from DOS in a XP MODE virtual machine running within Windows 7 to a USB printer attached to Windows 7. Specifically Canon MX 300 multi-function.

Have spent the last 3 days reading and trying things, but I'm about ready take this computer to a shooting range and see if they let me unload some rounds on it.

Here is what happens:
I initiate a print job from either the edit.exe command in DOS prompt within XP Mode or command line stuff like "copy test.txt LPT1", "copy test.txt > LPT1", "dir > Lpt2". etc. I get no error messages. The commands are accepted but nothing happens. If I am monitoring the printer queue on the Windows 7 machine I see something flash and then disappear. If I enable the option to leave documents in spool after printing, the status for anything I send says "printed", but nothing ever comes out of the printer. Don't understand how it can say printed, but nothing comes out of printer. I would expect some sort of error message, but there is nothing to guide me here. Thanks MS.

i can print from a text file on the desktop in XP Mode and it prints in the Windows 7. Since when I print to LPT1 or LPT2 I see something show up in the queue, I assume the LPT redirection to network printer is working fine.

Could it be that the Canon cannot handle dos generated printer instructions? Am I beating my head against the wall and my printer is the problem all along?

I followed the instructions to a T from the following page, http://blogs.msdn.com/b/7/archive/2010/11/30/enabling-printing-for-dos-applications-within-windows-xp-mode-vm-on-windows-7.aspx, which is great at explaining the steps in a clear way, it just doesn't address any real troubleshooting.

Any suggestions would be appreciated. I am reading snippets here and there about support for PCL languages? How do I know what the Canon supports? What else should I be looking for? I have seen and read many suggestions, but I have been focusing my attention on a share or redirection issue, and now wonder if I should try another printer. Not easy to do, don't want to buy a printer just to test but I need to get this working.
Avatar of ded9
ded9
Flag of India image

What is name of the dos application that you are running in XP mode.

Did u try running the dos application in compatibility mode in windows 7.

 Post device manager screenshot for xp and windows 7.

You could use software like printfil to print from dos.

http://www.printfil.com/english.htm





Ded9
Avatar of AdminMonkey
AdminMonkey

ASKER

The application the client I want to help is called Netview. It's an old DOS accounting program. It does not run in Windows 7 at all with any sort of compatibility settings.

I also tried using DOSBOX, and then tried DOSBOX megabuild when I realized the original does not have printing support. I also had to install printfil to capture the data sent to lpt 1. But the App runs so increadibly slow in Dosbox that client says they can't use it and they have to go back to their Windows XP. She and her accountant literally have two computers on their desk, with one just dedicated to running and printing from this program.

But having mentioned the application, don't think its relevant because all I am trying to do on my home pc is proof of concept, and I would settle for any sign of it working. I figured testing by printing from the edit.exe command or redirecting stuff to the lpt port is a valid test. I see other people who have these types of issues testing it that way to prove that it works. I think once I figure out what is wrong, it will work from edit.exe or manual redirection or her program.

My printer at home is a your basic Canon multi-function with a USB connection, plugged into Win 7. Too bad Canon does not provide universal drivers. I tried setting it up numerous ways to no avail:
- share in Windows 7, then download XP drivers from Canon site and install it in XP mode and then setup redirect (not sure why instructions say to do that if I am redirecting to network printer anyway)
- Attach it from drop down menu in XP mode, install drivers then, release it back to Win7
- Leave it attached to XP Mode, share it, then redirect LPT1 to the \\xpmodepc\canon
- create generic text printer in Win 7, share it, then attach to that from XP Mode to make sure that windows 7 drivers aren't somehow adding anything extra to the mix.

What really bothers me is the fact that I see it in the spool, and that if I check leave documents in spool after print it says "status: printed". Nothing in any system log or anything.
One option is to install windows xp  and remove windows 7

or

Use application like prinfil

http://www.printfil.com/english.htm

The ms commands are good option but client might face issues....lets wait for other suggestions.




Ded9
Avatar of Dave Baldwin
I have found that PCL commands do not make it thru the printers configured with 'net use...'.  Plain text does and that's about all.  This is especially true with GDI printers (most USB printers) that do not even have a text or PCL interface.  If it says it supports PCL3, that is completely misleading because whatever they think that is is not available as a printing interface or driver.
There's a windows console program 'winprint.exe' that sends a printout stored in a file to a windows printer, using binary mode. So that file can contain PCL if the printer understands that. I'll try to put it on a server somewhere and then post the URL here.
I suspect something along the lines of what you are saying DaveBaldwin. But I am getting mixed message because other people using DOS programs "seem" to indicate they got it working. It's just when I double-check everything that seems to work in their case, I either already tried it, or it just doesn't help.

MSIFOX how much user input is required to get your program to run? The user/users I have in mind will have pretty close to 0 skill.

I am tempted to drive over to customer's house, pick up her old printer and then bring it home to try it. If it turns out to be the printer, I will junk my current printer, I will never buy a canon product again, and will steer anyone that will listen away from Canon products in the future.
Please change the extention (so it gets past google spam filters) and send it to me. support@system-network-solutions.com.
The Canon Pixma seems to be a GDI printer. In this case it doesn't speak PCL, but can only be accessed through windows driver. Printfil mentioned above promises to solve this problem somehow. The program that I mentioned will most likely not work with a GDI printer, because for GDI printers the PC must rasterize the image to be printed, and send it as whole-page bitmap. These printers don't know fonts, so they cannot convert ASCII text to a printout themselves.
It won't do any good to avoid Canon products for this issue because virtually all USB connected printers these days have the same problem.  They are GDI printers and they do Not have a standard interface like PCL or Postscript built into the printer.  The driver on the computer formats the print data like a video stream and sends it to the printer.  

This will include HP, Epson, Canon, Lexmark, and just about any other USB connected inkjet printer you can find.  Also laser printers.  My HP 1000 USB printer is setup the same way.  They are not interested in supporting your old DOS programs because they don't make any money from you running old programs that were paid for many years ago.

For the DOS programs that still make me money, I have DOS 6.22 / Windows 3.11 computers to run them on.  I don't even try to run the programs on newer operating systems and computers because they don't support those programs.  I have one program I paid big bucks for many years ago that can't even run under Windows 3.11.  DOS only.
msifox is correct: the Canon is a GDI printer and does not understand plain text - they rely on the Windows graphics engine to convert the page into dots on the screen.

The only way to get DOS output to the MX300 is with something like DOSPRN. It takes the DOS output and prints it via the printer's Windows driver. It's a free download and works well.
Except that DOSPRN will not pass PCL commands thru to the printer.  Not that it matters because GDI printer won't understand them anyway, even if the docs say that it implements PCL3.  No one but HP and the other printer manufacturers know what PCL3 is anyway.
DOSPRN does support PCL, although it probably only supports a limited subset of them (I can't find any list of supported commands, but their What's New page mentions several PCL enhancements in the different versions. No DOS program uses any complex PCL commands anyway, mostly just plain text, with perhaps some font commands.

And, as DOSPRN feeds the PCL commands through the driver, it lets the diver convert them into a printer bitmap, be that PCL3 or some other GDI format.

PS: When we mention PCL we mean PCL5 and PCL6, which are are an entirely different animal from PCL3. Calling it PCL3 is just HP's way of making people think that the printer has a usable language, similar to PCL5 or 6. It doesn't.
ASKER CERTIFIED SOLUTION
Avatar of AdminMonkey
AdminMonkey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for helping me realize it was the printer itself misfox.