VOGONS

Common searches


Virtual printer

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 40 of 150, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

FWIW, printing on unixish systems usually means feeding it to the print spooler. A simple call can do it:

system("lpr dosbox-generated-page.ps");

The call doesn't take long, it just feeds the PS to the print system, and every decent unix (and I wouldn't be surprised if MacOS X behaved the same) will then print it in the background, whatever way it was configured to.

One problem, though: Some systems don't have "lpr", but "lp". A configure option to set the print command would be best, IMHO.
(Which means I volunteer for that as soon as it is in regular CVS)

Reply 41 of 150, by Alexsource

User metadata
Rank Newbie
Rank
Newbie

Is this still being worked on? any chance to add graphics? I have a tax program developped by my goverment and we are forced to print in A4, and the only way to do so is using my old EPSON LX-300...
It would be cool if i could use it for this 😉
I've added a 2 color scan of the printing output with an actual printer, it is a zipped .png, becuase the image size is big, and i didn't wanted to screw up the forum 😜.
The program is in spanish, BTW.

Attachments

  • Filename
    formulario.zip
    File size
    35.56 KiB
    Downloads
    105 downloads
    File comment
    zipped .png scan...
    File license
    Fair use/fair dealing exception

chronos.jpg motoakira.jpg

Reply 42 of 150, by floam

User metadata
Rank Newbie
Rank
Newbie

I get some compile errors.

printer.cpp: In function `void PRINTER_Init(Section*)':
printer.cpp:2191: error: invalid conversion from `void (*)(Bit32u, Bit8u)' to `void (*)(Bitu, Bitu, Bitu)'printer.cpp:2191: error: initializing argument 2 of `void IO_RegisterWriteHandler(Bitu, void (*)(Bitu, Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2191: error: invalid conversion from `const char*' to `Bitu'
printer.cpp:2191: error: initializing argument 3 of `void IO_RegisterWriteHandler(Bitu, void (*)(Bitu, Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2192: error: invalid conversion from `Bit8u (*)(Bit32u)' to `Bitu (*)(Bitu, Bitu)'
printer.cpp:2192: error: initializing argument 2 of `void IO_RegisterReadHandler(Bitu, Bitu (*)(Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2192: error: invalid conversion from `const char*' to `Bitu'
printer.cpp:2192: error: initializing argument 3 of `void IO_RegisterReadHandler(Bitu, Bitu (*)(Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2193: error: invalid conversion from `void (*)(Bit32u, Bit8u)' to `void (*)(Bitu, Bitu, Bitu)'printer.cpp:2193: error: initializing argument 2 of `void IO_RegisterWriteHandler(Bitu, void (*)(Bitu, Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2193: error: invalid conversion from `const char*' to `Bitu'
printer.cpp:2193: error: initializing argument 3 of `void IO_RegisterWriteHandler(Bitu, void (*)(Bitu, Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2194: error: invalid conversion from `Bit8u (*)(Bit32u)' to `Bitu (*)(Bitu, Bitu)'
printer.cpp:2194: error: initializing argument 2 of `void IO_RegisterReadHandler(Bitu, Bitu (*)(Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2194: error: invalid conversion from `const char*' to `Bitu'
printer.cpp:2194: error: initializing argument 3 of `void IO_RegisterReadHandler(Bitu, Bitu (*)(Bitu, Bitu), Bitu, Bitu)'
printer.cpp:2196: error: `KBD_MOD_ALT' undeclared (first use this function)
printer.cpp:2196: error: (Each undeclared identifier is reported only once for each function it appears in.)
printer.cpp:2196: error: `KEYBOARD_AddEvent' undeclared (first use this function)

Reply 43 of 150, by Chainsaw

User metadata
Rank Newbie
Rank
Newbie
Fizzban wrote:

Update: The newest version of the printer is able to send the data directly to an actual printer under Win32 (where this is easy to realize). For the other OSes, it will PNG output unless I find a good printing library.

The default output method is png image creation, direct printing needs to be set up in the dosbox.conf. DOSBOX will then display a print dialog as soon as you start printing.

What kind of lines i have to put into dosbox.conf to enable direct Output for win32?

Reply 45 of 150, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

[printer]
printer -- Enable printer emulation.\n"
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'').
output -- Output method for finished pages:

png : Creates PNG images in the DOSBOX directory
ps : Creates Postscript documents in the DOSBOX directory (default)
bmp : Creates BMP images (very huge files, not recommend)\n"
printer : Send to an actual printer (Print dialog will appear)
multipage -- Adds all pages to one Postscript file or printer job until ALT-F8 is pressed.

---------------------------------
So you probably have to add output=printer.

Reply 49 of 150, by S2F6AT

User metadata
Rank Newbie
Rank
Newbie

By building printer support in 0.63 with original printer patch I get patching errors! Is there patch for 0.63 source code?
0.61 works but have issues with num lock and caps lock. In fact I want to use DOSBox for runinng old DOS program under WindowsXP and need all this to work propperly.

Reply 50 of 150, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A little update...

- fit current CVS
- made it "Win3.11-compliant" - tested with Generic ESC/P 24Pin printer driver
- renamed conf file entry "output" to "printoutput"
- Alt-F8 key becomes Ctrl+F2 and can be mapped in keymapper (I hope)
- unlock mouse when the print dialog shows up
- I did patch the Linux makefiles and such as in original patch, but untested

Tested with Win3.11(edit and paint) and Simcity, nothing else. I cannot provide a binary since my build refuses to work with LIBPNG.

Attachments

  • Filename
    printer2.diff
    File size
    104.78 KiB
    Downloads
    92 downloads
    File license
    Fair use/fair dealing exception

Reply 51 of 150, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Some questions for you, h-a-l-9000.

1) Would you be so kind to point me out where to get some recent compiled Win32 binaries?

2) Is there any way to print to lpt1 or prn WITHOUT USING Windows printing engine? I just want to use WordPerfect 6.0 MS-DOS from DOSBox (because crappy NTVDM is limited to 16MB of memory). I just need to send data to my printer which is plugged into lpt1.

Thank you very much in advance.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 54 of 150, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Stupid me. I have Ykhwong's 20051013 build downloaded and wasn't aware of the patch. Thank you very much for your replies.

Hmmm. Right. I still need a LPTx passthrough.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 56 of 150, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Oh, look at the sidebar to the left, there's my location. I bet you'll find an online delivery service that is capable of online payment. 😀 Just kidding, the day this patch goes into regular CVS I will have a stab at it for linux improvements anyways, so I may be bored and do the passthrough thing as well.

Reply 58 of 150, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
`Moe` wrote:

...the day this patch goes into regular CVS

Well, the question is whether this will ever happen. I urged it already before 0.63 was published... But it seems that developers do not like adding functionality which is not vital for games...
I hope they will reconsider it...

Mirek

Reply 59 of 150, by mot

User metadata
Rank Newbie
Rank
Newbie

Does anybody know why I'm getting blank pages out of my printer using dosbox 0.63 and the cvs patch from ykhwong, in wp51. I tried selecting several different printers in wp, including HP Laserjet III, Epson EPL 8000, and Epson FX 850. The printer selection window opens and asks me what printer to use, I select my printer, and then it just prints one blank page. I tested printing from notepad, and it prints fine....

Help?