Sign in with
Sign up | Sign in
Your question

Can you print from a dosbox to a local printer

Tags:
  • Printers
  • Windows XP
Last response: in Windows XP
Share
January 3, 2012 5:10:47 PM

can you print from a dosbox to oki ml320

gary

More about : print dosbox local printer

January 3, 2012 6:17:22 PM

Yes, you just need to capture LPT1 to point to your Windows printer.

First, enable sharing on the Windows printer.

Then, use this command in a Command Prompt: NET USE LPT1 \\YourComputerName\PrinterShareName /PERSISTENT:YES
m
0
l
November 30, 2012 11:59:51 AM

Quote:
Yes, you just need to capture LPT1 to point to your Windows printer.

First, enable sharing on the Windows printer.

Then, use this command in a Command Prompt: NET USE LPT1 \\YourComputerName\PrinterShareName /PERSISTENT:YES


That's right. You will have to assign the printer to LPT1 port and then...

1. You will need to download DOSBox Megabuild version that supports printing and parallels from here: http://home.arcor.de/h-a-l-9000/ I am using version 6

2. Once installed you will need to go to the DOSBox config file and set up as following:
Spoiler
[printer]
# printer: Enable printer emulation.
# dpi: Resolution of printer (default 360).
# width: Width of paper in 1/10 inch (default 85 = 8.5'').
# height: Height of paper in 1/10 inch (default 110 = 11.0'').
# printoutput: Output method for finished pages:
# png : Creates PNG images (default)
# ps : Creates Postscript
# bmp : Creates BMP images (very huge files, not recommend)
# printer : Send to an actual printer (Print dialog will appear)
# multipage: Adds all pages to one Postscript file or printer job until CTRL-F2 is pressed.
# docpath: The path where the output files are stored.
# timeout: (in milliseconds) if nonzero: the time the page will
# be ejected automatically after when no more data
# arrives at the printer.

printer=true
dpi=360
width=85
height=110
printoutput=printer
multipage=false
docpath=.
timeout=0

[parallel]
# parallel1: parallel1-3 -- set type of device connected to lpt port.
# Can be:
# reallpt (direct parallel port passthrough using Porttalk),
# file (records data to a file or passes it to a device),
# printer (virtual dot-matrix printer, see [printer] section)
# Additional parameters must be in the same line in the form of
# parameter:value.
# for reallpt:
# Windows:
# realbase (the base address of your real parallel port).
# Default: 378
# ecpbase (base address of the ECP registers, optional).
# Linux: realport (the parallel port device i.e. /dev/parport0).
# for file:
# dev:<devname> (i.e. dev:lpt1) to forward data to a device,
# or append:<file> appends data to the specified file.
# Without the above parameters data is written to files in the capture dir.
# Additional parameters: timeout:<milliseconds> = how long to wait before
# closing the file on inactivity (default:500), addFF to add a formfeed when
# closing, addLF to add a linefeed if the app doesn't, cp:<codepage number>
# to perform codepage translation, i.e. cp:437
# for printer:
# printer still has it's own configuration section above.
# parallel2: see parallel1
# parallel3: see parallel1

parallel1=enabled dev:lpt1
parallel2=disabled
parallel3=disabled

Changes have been done in underlined bolded lines. (In parallel part: dev - device name(in other words name of the printer saved on your PC)

3. Save changes and enjoy printing from the DOSBox.

:) 
m
0
l
Related resources
November 30, 2012 10:31:13 PM

Maybe I am missing something, lets say I wanted to print a directory listing to lpt1, dir > lpt1
m
0
l
December 3, 2012 6:45:09 AM

ktownmike said:
Maybe I am missing something, lets say I wanted to print a directory listing to lpt1, dir > lpt1

I cannot see the problem with printing the directory. But remember that you will have to assign the port LPT1 to the shared printer...
Quote:
Yes, you just need to capture LPT1 to point to your Windows printer.

First, enable sharing on the Windows printer.

Then, use this command in a Command Prompt: NET USE LPT1 \\YourComputerName\PrinterShareName /PERSISTENT:YES
m
0
l
May 16, 2013 1:22:33 AM

Hello. I tried this solution on three computers with different printers, and I get the same result everytime - I get the print task in printers tasks to print, but the task is small and nothing prints. It just disappears after few seconds as it gets end of the file or finds it´s blank task. Can anybody help how to set the output session and printing correctly please?
m
0
l
May 16, 2013 8:43:23 AM

It looks like the drivers problem.

What printer do you use?
m
0
l
May 16, 2013 2:03:08 PM

I use Samsung SCX 4600, and some HPs (for example 1018 here at home). All those get the print task, but HPs are idling on it, while Samsung deletes/prints it blank in a second. I can set the dosbox many ways, with different results, but never have full success.
1) Print task not printed (also task too small as described)
2)Print task divided in many files/pages, printer prints just one column of text on each paper. Must stop the printer or rainforests are gone..
3)I can put LPT output into a file, and pick it externally > print immediately, but I get bad codepage/unwanted letters in the output file (txt).
m
0
l
May 21, 2013 4:40:33 AM

What program do you use to print?
If the program prints in a printer specific code, the printer you use will need to support that.
f.e.. HP used PCL code, your printer now has to support that as well (PCL3 or PCL5)
PCLGUI is not compatible
m
0
l
May 21, 2013 6:23:22 AM

Don´t know man, just custom accounting (invoices, bills) program for my small company. I solved it another way. Found very good program called winprint, which installed itself automatically on the dosbox/my program, so I can choos it as a printer. It makes external file from the print command, and also can be set to pick the file immediately and print it. It is not clean solution, but works. So it´s propably done for me. Maybe I´ll later just play with the dosbox and printing my way, but nothing really "needed".
Thank you guys anyway.
m
0
l
May 23, 2013 6:24:51 AM

I know from the experience that if your printings are showing 'strange' characters it is drivers problem. In my company I use 'HP LaserJet 4L' driver for all HP printers that I print from DosBox.
May be worth giving a try for one of your HP printers.

Let me know how it goes. :) 

Cheers!
m
0
l
May 23, 2013 6:30:21 AM

And just to clarify first you have to install your HP printer on LPT1 port on your PC with HP LaserJet 4L driver and name it as LPT1, then use command prompt: "net use LPT1: \\network-path-to-your-printer /persistent:yes"
Before that please make sure that you don't have LPT1 printer installed on your PC and that you dont have physical LPT1 port you your PC (If you have one you have to disable it in Device Manager)
m
0
l
!