Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print to Lpt1(prn) from DOS progam

    I have an old dos program which only prints to the prn (lpt1) port. Please save the comments regarding upgrading the program, etc. I have not found an alternative and up until this point I have managed to make everything work.

    The problem pc does not have a lpt port. I have used the net use lpt1 \\server\printer command to redirect the output and everything seems to be functioning.

    When printing, a spool file is created (I can see it and the 0utput looks normal), the file seems to be properly sent to the redirected networks print queue as it shows up in the queue. However, it will never print. It tries and then reports a print error. (the same method works on a different machine).

    Any suggestions in how to trouble shoot this would be appreciated.

    Thanks,

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    2,820
    Thanks
    19
    Thanked 108 Times in 102 Posts
    What does the print file look like? Is it purely text, or does it contain formatting, perhaps for a particular printer?

    If pure text, I'd try redirecting the output to a txt file, and then printing it from there (perhaps by loading it into notepad).
    As in DOSprog.exe > D:\DOSProgOutput.txt

    I gave up with 'straight' DOS printing several years ago, because of similar problems to those you are encountering.
    BATcher

    If it wasn't for the weather, Great Britain would be a silent nation.

  4. #3
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It is almost purely text with a few formatting commands. I just tried printing with no formatting and the same problem pops up. I can also change the printer it is directed to and no matter where it goes, same problem. I tried printing to a cutepdf printer and same thing.

  5. #4
    3 Star Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    347
    Thanks
    0
    Thanked 24 Times in 24 Posts
    I have also had success using the DOS command then open in a word processor program such as Wordpad, Notepad [both come with Windows] or other text program then print but as mentioned a lot will depend upon whether the program can save the print output to a file.

    If the computer is a Desktop you might be able to use an Add-in PCI Printer Port card.
    http://www.tigerdirect.com/applicati....asp?CatId=512

  6. #5
    Gold Lounger
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    3,495
    Thanks
    7
    Thanked 220 Times in 208 Posts
    If you can print to file you should be able to drop the file into a network print queue.

    cheers, Paul

  7. #6
    New Lounger
    Join Date
    Apr 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You didn’t specify the operating system your old DOS program is running on.
    Has to be some Windows version (net use …), so you can try vDos: http://sourceforge.net/projects/vdos.
    It goes beyond what you tried and expected until now to get that DOS program running in Windows.
    At least printing shouldn't be an issue anymore.
    Last edited by JosSchaars; 2014-06-08 at 16:56.

  8. #7
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I will take a look at vbox or the referenced dosprinter.exe program. I am running under win XP currently but vbox may help with my hesitation to upgrade to 7 or 8 if it works.

    The programs currently work with the exception of the printing. the printing problems only appear on my laptop. I have a desktop where everything works fine. The odd part is that the spool files are being created and sent to the proper queue, they just refuse to print.

  9. #8
    New Lounger
    Join Date
    Apr 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your network printer is connected to another PC and shared from there?
    Have you looked at the render print jobs on client computers option?
    Eventually install the printer driver on the laptop, connect it to the network printer, share it and use that in net use lpt1.

  10. #9
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Jos - The printer is a network printer but the printer is installed on the laptop and works fine if printing a test page or sending items from later Windows based programs.

    I assume there is a problem with the actual spool file (or instructions in the .shd file.

  11. #10
    2 Star Lounger
    Join Date
    Jun 2011
    Location
    Hampshire (the old one)
    Posts
    140
    Thanks
    2
    Thanked 15 Times in 15 Posts
    Are you trying to print from the dos application? You could try printing directly from a Command Prompt:

    print /d:\\<hostcomputername>\<printersharename> <path><filename>

  12. #11
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Trying to print directly from the program. Although I have not tried just printing a file from the a dos window using the print command. I do not have the laptop with me at the moment but I will try that tonight.

  13. #12
    New Lounger
    Join Date
    Apr 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's a Windows GUI printer?
    Then you can't send ASCII output directly to it, it has to be rendered by the printer driver.
    So share the printer on the laptop and use that in net use lpt1.

  14. #13
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This problem is occurring on several printers which are installed and shared on the laptop.

    I use the command net use lpt1 \\server\printer, the net use command shows all working correctly.

    When I print from the dos program, a spool file is created and sent to the proper printer queue. The problem is it will not print. It always shows a print -error after a short amount of time.

  15. #14
    Silver Lounger mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    2,137
    Thanks
    202
    Thanked 206 Times in 198 Posts
    One way you could probably print would involve one extra step:

    1) Print to PDF using either Adobe Acrobat, Nitro PDF, or another such program.
    2) Print the resultant PDF file using normal Windows print methods.

    I have found that if you first print to PDF, and then print the PDF file, it is a lot easier to manage and deal with difficult printing issues.

    As a side benefit, you will have a PDF image of your print job, in case you wanted to save a copy of it for some reason. If not, you can delete the PDF after printing it.

  16. #15
    New Lounger
    Join Date
    Dec 2009
    Location
    Chicago, IL
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have the exact same problem using the cutepdf writer. The installation works fine when printing from windows programs, but when redirecting to this printer the spool files shows up but the job never finishes.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •