Epson Printing
Has anyone pested the program "epsonps" with dosemu?
It is suposed to convert Epson the printer output with control codes and generate a Postscript file. This would be great for compatibility, specily now that even Epson printers don't accept control chars anymore.
Some links (I didn't anything better):
http://cvsup.de.openbsd.org/historic/comp/usenet/comp.sources.misc/epsonps/
http://www.faqs.org/ftp/pub/usenet/comp.sources.misc/archive-name/volume20/epsonps/
Alain
Alain M. schreef:
Quoted 1 line
Has anyone pested the program "epsonps" with dosemu?
"tested" it you mean? Have you tested it yourself yet?
Quoted 4 lines
It is suposed to convert Epson the printer output with control codes and generate a Postscript file. This would be great for compatibility, specily now that even Epson printers don't accept control chars anymore.
I haven't, but this approach is sound in principle. I do a similar thing with the HP (PCL) control language.
My Brother printer (with its drivers) only understands Postscript and pdf. I made an input filter (for lprng) that changes PCL to pdf, using pcl2pdf, which is part of GhostPCL
(http://www.artifex.com/downloads/). I tell my DOS programs that they are talking to an HP Laserjet. Pure "raw text" is first changed into PCL by prepending a PCL initialisation string. This works. DOS programs can print both text and graphics.
Maybe doing it with epsonps would be simpler.
Regards, Jan
Emulating a laser printer (was Epson Printing)
Hi Jan,
Thanks for your reply :) :) I installed GhostPCL reconfigured my DOS program and it is working wonderfully.
So here is what I did:
1) download and compile GhostPCL (http://www.artifex.com/downloads/)
2) Configure Dosemu with this to generate PS (faster then PDF) and convert from stdin to stdout sending to printer:
$_printer_command = "pcl6 -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- - | lpr -P EpsonC87"
I only tested with a simple DOS program, I will test with some CAD later.
As for Epson PS, maybe someday I will test it. I haven't tested it because it is a very old source code which will probably take some work to use with new compilers.
Alain
Jan Willem Stumpel escreveu:
Quoted 10 lines
I haven't, but this approach is sound in principle. I do a similar thing with the HP (PCL) control language.
My Brother printer (with its drivers) only understands Postscript and pdf. I made an input filter (for lprng) that changes PCL to pdf, using pcl2pdf, which is part of GhostPCL
(http://www.artifex.com/downloads/). I tell my DOS programs that they are talking to an HP Laserjet. Pure "raw text" is first changed into PCL by prepending a PCL initialisation string. This works. DOS programs can print both text and graphics.
Re: Emulating a laser printer (was Epson Printing)
Alain M. schreef:
Quoted 4 lines
2) Configure Dosemu with this to generate PS (faster then PDF) and convert from stdin to stdout sending to printer:
$_printer_command = "pcl6 -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- - | lpr -P EpsonC87"
Yes.. this approach (using the Dosemu $_printer_command, and using pcl6 directly) looks simpler than mine (I define a printer called dos in /etc/printcap, with its own input filter involving pcl2pdf; then I put $_printer = "dos" in ~/.dosemurc).
Quoted 2 lines
I only tested with a simple DOS program, I will test with some CAD later.
Please let us know how it goes. In my case I can even call (from dos):
copy /b xxx.pcl prn:
where xxx.pcl is some kind of pcl encoded graphics file (some examples, high-resolution Mandelbrot set pictures, are to be found on my page http://www.jw-stumpel.nl/z-scope.html).
Quoted 3 lines
As for Epson PS, maybe someday I will test it. I haven't tested it because it is a very old source code which will probably take some work to use with new compilers.
Compiling it is not such a big problem (but I have not tested it yet). I just changed
#ifdef __TURBOC__
#define ANSI
#endif
to
#define ANSI
Then it compiled simply by "cc -o epsonps epsonps.c".
Regards, Jan
Re: Emulating a laser printer (was Epson Printing)
In reply to Alain M.Perhaps an even better way to make it work is:
1) Compile & install GhostPCL. This puts pcl6 in
/usr/local/bin.
2) Put an executable script in /usr/local/bin:
#!/bin/bash PREFIX="\eE\e9\e&l26A\e&a6L\e&k2G\e(s12H\e(10U" SUFFIX="\eE"
TEMP=mktemp -u /tmp/dosprint.XXXXXX
cat > $TEMP
FILE_TYPE=file $TEMP|sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'
case "$FILE_TYPE" in
"HP")
cat $TEMP
;;
* )
echo -e $PREFIX
cat $TEMP
echo -e $SUFFIX
;;
esac
rm $TEMP
3) Do not specify $_printer in ~/.dosemurc; specify $_printer_command:
"dosprint|pcl6 -dNOPAUSE -sDEVICE=pswrite -sOutputFile=- - |lpr"
This assumes that your system prints Postscript OK when it is just piped to lpr. This has always been the case on my Linux systems, but I've never used CUPS. Don't know if it works on CUPS systems. Anyway, if this works, the user does not have to worry about /etc/printcap or writing an input filter. Thanks much for this tip.
The dosprint filter just passes through any data which have been formatted as HP PCL by a DOS program. For other data (like screen prints, or things sent to the printer by means of the DOS "print" command) first the PREFIX is sent, then the data, followed by the SUFFIX. In the PREFIX (to be modified according to the user's needs), the pitch is set to 12 chars/inch, the paper size to A4, and the character set to PC DOS (so "box characters" get printed OK). HP PCL codes can be found at several places on the Internet.
I suppose this still has to be tweaked a bit; I find that the top margin is too big when printing "real" PCL.
Regards, Jan
1.3.3 flashy screen and overactive keyboard
Still hoping for some help, as I got no response to the message below October 18th.
If there's a place I should look instead of asking, could someone please point me to it?
Thanks,
jamie
_______________________________________________________________________________________________________________
I've compiled 1.3.3 and tried running it. All else is well, I think, BUT....
The problem is a screen (X box) that flashes with every keystroke (all programs) and often enters double characters.
I installed the following before compiling:
bison 2.3
s-lang 2.0
flex 2.5.4
I'm running Mandriva 2006, and using their X libraries.
My machine is a Dell Latitude 600.
Any idea how I can settle down the keyboard/display?
thanks,
jamie
1.3.3 flashy screen and overactive keyboard
In reply to Jan Willem StumpelStill hoping for some help, as I got no response to the message below October 18th.
If there's a place I should look instead of asking, could someone please point me to it?
Thanks,
jamie
_______________________________________________________________________________________________________________
I've compiled 1.3.3 and tried running it. All else is well, I think, BUT....
The problem is a screen (X box) that flashes with every keystroke (all programs) and often enters double characters.
I installed the following before compiling:
bison 2.3
s-lang 2.0
flex 2.5.4
I'm running Mandriva 2006, and using their X libraries.
My machine is a Dell Latitude 600.
Any idea how I can settle down the keyboard/display?
thanks,
jamie