On Mon, 17 Jul 2000 18:43:55 +0000 Bastiaan Edelman wrote:
> I am very interested in this because my HP1200C printer is supposed to
> work with PCL language. This would make image printing possible ?? and
> True Type characters ??
> Second I asked the list if it would be possible to insert a small
> program in Arachne that becomes active before printing starts.
> Purpose is to be able to give initialising commands to the printer first
> to change the code page from cp 437 to ISO-8895-1 and change the printer
> control commands for italics and bold printing.
> So how did you change MIME.CFG ?
>
For you, Bastiaan, and for others who may be interested in using
Ghostscript to print PS files to a PCL printer, here's what I did. (I
should add that I'm no expert, so all suggestions for improvements are
most welcome!)
Firstly, modify MIME.CFG. Find this line:
file/exportps.dgi |[100]COPY _4prt.ps $s>NUL
Add a ; to the start of it to comment it out. Then add this line:
file/exportps.dgi |@call ar-gs.bat $s
Now add the following batch file to the ARACHNE directory. Call it
AR-GS.BAT:
=== Start of AR-GS.BAT =====
@echo off
rem PostScript BATCH file for Arachne 1.6x
rem 28/1/2000
rem
cd c:\graphics\gs
set GS_DEVICE=ljet4
rem
rem remove -dNOPAUSE from the end of the following if required
rem
set GS_OPTIONS=-q -Ifonts -dFIXEDMEDIA -dNOPAUSE
call gs386 -r300 -sPAPERSIZE=a4 c:\internet\arachne\_4prt.ps -dBATCH
set GS_DEVICE=
set GS_OPTIONS=
cd c:\internet\arachne
=== End of AR-GS.BAT =======
This batch file assumes that the Ghostscript files are in a directory
C:\GRAPHICS\GS and that Arachne is in C:\INTERNET\ARACHNE, of course.
I'm sorry about the mixture of upper-case and lower-case in this batch
file, but I suspect that Ghostscript may be a bit fussy about it. As GS
was difficult enough to get working anyway, I thought that I'd leave it
once I'd got it working. If Arachne's support for PS output is to be
removed, then this is all a bit academic anyway!
The other interesting thing about Ghostscript is that it will print
Acrobat .PDF files - usually fairly well. You can show them on screen as
well, but I don't think that there's any pan/zoom facility, so most
things are practically unreadable on screen. It falls over on some .PDF
files, giving very cryptic error messages, but it manages many more than
the Acrobat for DOS ever did, so at least it's a slight step forwards.
I've made a .BAT file to control Ghostscript, which I can send if it's
of any interest.
Also, because so many data sheets in .PDF format seem to run to
many tens of pages and I'm very mean about printing costs, I devised a
Turbo Basic programme that would call Ghostscript to print double-sided.
Actually what it does, of course, is to print all odd-numbered pages and
then get you to reload the paper into the printer before printing all
even-numbered pages. This programme is also available if anyone would
like to have a fiddle with it.
Finally, you asked about sending characters to the printer before
Arachne starts printing, so as to be able to set up the printer. I don't
have to do this as a rule, but when I have needed to, I have written a
simple .BAT file with lots of lines in it like this:
echo [some load of escape codes] >LPT1:
Obviously, you'll want to change LPT1 to whatever port your printer's
connected to! For example, I used this to get my Laserjet 4 to print
many copies of a .PCL output file from a word-processor when the original
'source' file wasn't available. This is how I did it:
echo Setting number of copies to %2 . . .
echo &l%2X >LPT1:
%2 is a parameter given to the batch file at the command line to
set the number of copies required. The first line confirms on the screen
to the user the number of copies that the printer is instructed to print.
Hope that some of this is helpful. Let me know if there's anything
else that you want to know about what I do!
All the best,
Ron.