[comp.binaries.ibm.pc.d] LPT1 to disk file...

ao@infovax.UUCP (Anders Ohlsson) (08/31/89)

	Does anybody know if there is a TSR program or some
	other stuff that is capable of taking care of the
	output to LPT1 and redirecting it to a disk file.

	This would be useful if the software (that does the
	printing, that I want redirected) and the printer are
	not on the same system.

				Thanx in advance,

					Anders Ohlsson

   ________________________________________________________________________
  (-:     ===================== Anders Ohlsson =====================     :-)
  (-; ====================== ohlsson01@lne.kth.se ====================== ;-)
  (-: ======================== or ao@infovox.se ======================== :-)
  (------------------------------------------------------------------------)
  (-; ======== Complex problems have simple, easy-to-understand ======== ;-)
  (-:     ===================== wrong answers. =====================     :-)
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

santol@cbnewsc.ATT.COM (shawn.r.antol) (08/31/89)

In article <197@infovax.UUCP>, ao@infovax.UUCP (Anders Ohlsson) writes:
> 	Does anybody know if there is a TSR program or some
> 	other stuff that is capable of taking care of the
> 	output to LPT1 and redirecting it to a disk file.
> 					Anders Ohlsson

If such a creature exists, please post it to the net so that the
rest of us might benifit too.  'Course with the way c.b.i.p has been
lately, you might be able to write one before the net sees it =)

P.S.
 To anyone who has sent me email in the past, I respond to all inquiries.
However, many times your mail bounces back.  Please include a phone number
in your signature...

Shawn Antol
AT&T Bell Labs
Naperville, Il
312-979-5622 voice
Send email to:	att!ihlpb!santol

#include <std.disclaimers>

ecctp@warwick.ac.uk (Dr J A K Cave) (09/01/89)

I made a collection of such programs last year when trying to get PS output
printed on our remote Laserwriters.  There is even one that comes free but
undocumented with Harvard Graphics.  Anyhow, drop me a line and I'll send you
some.  The best one depends on what program generates the output.  I found
that HG and Lotus for example, sometimes introduced illegal control characters
that screwed up the uploading process, or left off the final "showpage" etc. I
have a shell file that takes care of that stuff as well, if you need it.

ts@chyde.uwasa.fi (Timo Salmi LASK) (09/01/89)

In article <197@infovax.UUCP> ao@infovax.UUCP (Anders Ohlsson) writes:
ao>	Does anybody know if there is a TSR program or some
ao>	other stuff that is capable of taking care of the
ao>	output to LPT1 and redirecting it to a disk file.

If you can ftp, please scan the /pc/pd2 directory at our site.
...................................................................
Prof. Timo Salmi                                (Site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun

ncpmont@amdcad.AMD.COM (Mark Montgomery) (09/01/89)

In article <730@chyde.uwasa.fi> ts@chyde.uwasa.fi (Timo Salmi LASK) writes:
>In article <197@infovax.UUCP> ao@infovax.UUCP (Anders Ohlsson) writes:
>If you can ftp, please scan the /pc/pd2 directory at our site.
Kind of off the original subject but how does one "ftp" to or from a
non-local site?  I've read "man" on ftp and tried every permutation
I can think of but can't get anything more than some variation of
"permission denied" for many reasons.  Please fire off some responses
for someone who wasn't born w/ a silver net on their P.C.
		Thanks,		Mark

ts@chyde.uwasa.fi (Timo Salmi LASK) (09/01/89)

In article <27065@amdcad.AMD.COM> ncpmont@amdcad.UUCP (Mark Montgomery) writes:
>In article <730@chyde.uwasa.fi> ts@chyde.uwasa.fi (Timo Salmi LASK) writes:
>>In article <197@infovax.UUCP> ao@infovax.UUCP (Anders Ohlsson) writes:
>>If you can ftp, please scan the /pc/pd2 directory at our site.
>Kind of off the original subject but how does one "ftp" to or from a
>non-local site?  I've read "man" on ftp and tried every permutation
>I can think of but can't get anything more than some variation of
>"permission denied" for many reasons.  Please fire off some responses
>for someone who wasn't born w/ a silver net on their P.C.

   The standard reply is "please contact your system manager". 
There are two sides to ftp.  First, you must have the necessary
connections at your site.  This part of things I know very little
of, and I hope that someone else takes it up to explain it. 
   Second, IF and WHEN you have the ftp capability, then you must
know how to use it.  This part is not too difficult.  This newsgroup
has had regular posting about ftp commands, most often from Keith
Petersen for Simtel20.  And I can give the advice for getting my
programs from our site.  I shall put it once more below, even if I
posted it not very long ago to this newsgroup for a similar reason!
You will find the ftp instructions towards the end of the message. 
Note that even if the advice below is written for getting my
programs, the principles are similar for getting any other files, as
well. 

------------------- begin prerecorded message ----------------------

There are some frequently asked questions about the ts-programs
available by anonymous ftp from the /pc/ts directory at the
University of Vaasa, Finland, site 128.214.12.3. Here are some of
them prerecoded with answers.
...................................................................
Prof. Timo Salmi                                (Site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun
...................................................................

*****
Q: I do not understand this getting files with anonymous ftp. What
does it mean?

A: Ftp stands for file transfer program, which is a standard feature
in many mainframe Unix and VAX/VMS systems. It also means that you
must have a network connection to reach University of Vaasa. Please
contact your computer's system manager for more information on ftp.

*****
Q: I have no access to your system. Would you please send your
programs to me by email.

A: Sorry. The reply to this frequent query is a definite no. There
is so much demand for ts-progs (I am pleased to say) that providing
this kind of service would simply get out of hand. The programs
have, however, reached quite a number of mainframe sites and BBSes
and you just have go looking for them, or forget the whole thing. -
Also notice that if you do not have the ftp capability, but do have
an access to UseNet news, some of these programs have appeared in
comp.binaries.ibm.pc newsgroup as binary postings. - There is one
drastic alternative for getting the programs sent to you by ordinary
mail on disks. These programs may be used and distributed freely for
private, non-commercial, non-institutional purposes. For other
purposes they must be registered. This leaves you the option of
obtaining the programs by registering them. In that case each
package is delivered on a 3.5" 720K diskette, but then you would
have to pay around $25-$35 for each individual package in advance
for a personal registration.

*****
Q: I am interested in the sources of some of your programs (or
particular procedures in them). Would it be possible to get them?

A: Sorry. Also here the answer has to be negative. Besides the
reasons in the previous answer, I never reveal my sources :-)

*****
Q: Some of your programs refuse to work on my PC. They do nothing or
just confuse the screen.

A: Not surprising. The ts-programs are (mostly) Turbo Pascal 5.0
programs written for true compatibles. In particular, the programs
which use advanced screen writes (inverted colors, windowing, etc)
and the so called interrupts (direct access to PC's internal
services) require a truly compatible PC. Most frequently the problem
is in the user's non-standard video adapter hardware. A proper CGA,
EGA or VGA personal computer should have no problems, but a
monochrome might. (Monochrome PCs often are older and non-compatible
anyway.) The thing to do is to try out the offending program on a
truly compatible machine. If it does not work even then, I would be
very interested in a description of the problem.

*****
Q: I have the ftp (file transfer program) capability and a network
access that includes your 128.214.12.3 site. But how do I transfer
the files? What are the commands?

A: The information and examples in the appendix (see below) should
enable you to get the files.

*****
Q: I have received your programs but the package is corrupt. When I
try to unpak them with my unpacking program (pkxarc, pkunpak, arc,
etc.) the unpacking fails or produces files that lock my PC.

A: This is almost always due to the failing to transfer the files
correctly from your mainframe to your PC. Please see the latter part
of the appendix for more information.

***
Q: What are the rules for using your programs. Are they freeware,
shareware, or what?

A1: Some, albeit very few users have been considerate enough to ask
this question.  The answer is contained in the .inf document files
of the programs and the it is the following.  You are free to use
and distribute my programs as long they are used for private
purposes only.  For ANY other purpose (including using at work in
business enterprises, university teaching, and government offices)
please contact me for a registration.  A few of the packages (TSLIN
linear programming, TSxST statistics packages, and TSPELL spelling
checker) are scaled-down versions.  To obtain a full-scale version
you will have to register. 

A2: If and when you distribute my programs as acceptable under A1, I
would REALLY appreciate it if you distributed the original packages
unchanged (repacking with a different packing method is quite ok,
though).  Plase do not distribute separately any of the programs or
files in the packages.  Give out a whole package, or nothing, if you
please. 

***
Q: The lines to Europe are not always available. Does any site in
the U.S. have your collection.

A: Yes, thanks to Keith Petersen. Simtel20 (site 26.2.0.74) has
practically all my programs, and Keith has kindly been getting the
most current versions as soon as they have come out. There might be
other sites, but this I know of.

*****
APPENDIX:
Obtaining the PD Programs by Timo Salmi via InterNet
====================================================

   You can obtain the file(s) from chyde.uwasa.fi (128.214.12.3)
using the InterNet ftp (file transfer program) with username
"anonymous".  For a login password use your electronic mail address. 
If you are using ftp from a VAX/VMS system, set case lower before
proceeding. 
   The files are in directory /pc/ts.  At the ftp> prompt first type
binary (for binary files).  To go to the relevant directory apply cd
/pc/ts.  To see its contents apply ls or dir.  To download a file,
use get filename or mget filenames.  The files have been packed with
PKPAK so you will need PKUNPAK from PKWARE to unpack them in your
PC. 
   The following contains the same information by giving the
commands needed for transferring tsarc028.txt (contains a summary of
the programs) and tspfon29.arc as an example.  In the example its is
assumed that you are calling from a Unix system.  The usage for a
VAX/VMS system is quite similar. 
   It is recommended that you first get the files 0contents and
tsarc028.txt (or later version) for more information.

ftp                   #Invoke the file transfer program
open 128.214.12.3     #Connect to chyde.uwasa.fi at the University
                      #of Vaasa
anonymous             #Use this name to get temporary privileges
Give your email address as your password
cd /pc/ts             #Go to the relevant directory
dir                   #Directory of available files
ascii                 #tsarc028.txt is an ordinary text file
get tsarc028.txt      #Copy the file to your default directory
binary                #tspfon29.arc is a binary file
mget tspfon*.arc      #mget allows wildcards
close                 #Terminate the connection
quit                  #Quit the file transfer program
 
Transferring the Programs to PC
===============================

   After you have received the files to your host, there still
remains the task of transferring the programs to your PC.  This is
familiar to most users, but occasionally there are problems.  It
impossible to give advice that would cover resolving all the
difficulties, but the most common can be described.  The most usual
file transfer method between the host and the user's PC is MsKermit.
(Z-modem and others may be used as well, but I would guess that most
often persons using these alternatives are advanced users, and can
resolve any problems by themselves.)
   The most common problem is probably that after getting a packed
file to one's PC, the file appears damaged.  Almost always this is
due to failing to set correctly the MsKermit parameters in BOTH ends
of the transfer.  What you have to do is in your host MsKermit to
set file type binary, set parity even (or none or whatever), and in
your PC MsKermit you must have the SAME parity you set for your host
(select host MsKermit parity on the basis of your PC's).  If you
fail to get these compatible, the transfer will not result in what
you want. Transferring text files does not lead to problems so
often.  The trick is set file type text (or ascii depending on your
MsKermit version).
   Finally, if nothing else, absolutely nothing else(!), seems to
resolve the problem, please let me know, and I will check that the
file at our site is good and proper.
 
-------------------- end prerecorded message -----------------------

fredex@cg-atla.UUCP (Fred Smith) (09/01/89)

In article <2851@cbnewsc.ATT.COM> santol@cbnewsc.ATT.COM (shawn.r.antol) writes:
>In article <197@infovax.UUCP>, ao@infovax.UUCP (Anders Ohlsson) writes:
>> 	Does anybody know if there is a TSR program or some
>> 	other stuff that is capable of taking care of the
>> 	output to LPT1 and redirecting it to a disk file.
>> 					Anders Ohlsson
>
>If such a creature exists, please post it to the net so that the
>rest of us might benifit too. 





A program which will work for many cases to do what you want is very
easy to write. If the program whose output you wish to grab is doing
its printer output via DOS services (i.e., not using BIOS or going
direct to the hardware) all you gotta do (in C) is to redirect the
output which would go to "stdprn" to somewhere else instead:

   #include <stdio.h>

   FILE * printer_file;

   printer_file = freopen ("prtfile.dat", "wb", stdprn);

   system (your_program);

   fclose (printer_file);

   exit(0);

This will grab all of DOS's output to the printer and write it to a file
named "prtfile.dat" (w/o the quotes).

As to whether or not your application is bypassing DOS or not, the easiest
way to find out is to try this and see if it works. If not, all you've
lost is about 20 minutes!

Fred

racine@yunexus.UUCP (Jeff Racine) (09/01/89)

In article <2851@cbnewsc.ATT.COM> santol@cbnewsc.ATT.COM (shawn.r.antol) writes:
>In article <197@infovax.UUCP>, ao@infovax.UUCP (Anders Ohlsson) writes:
>> 	Does anybody know if there is a TSR program or some
>> 	other stuff that is capable of taking care of the
>> 	output to LPT1 and redirecting it to a disk file.
>> 					Anders Ohlsson

I have a utility which was bundled with PCMAG utilities (don't remember which
issue offhand) It is called PRN2FILE.

Anyway, this utility does exactly what you want to do. It redirects any output 
directed to LPT1 and stores it in a disk file which you name.

Unfortunately, it is on my machine at home. However, if someone has not posted it in the next few days, I will uuencode it and post.

Hope this helps.

ODX@PSUVM.BITNET (Tim Larson) (09/01/89)

I have seen (but never used) a program called LPTX that redirects LPTn to
a disk file.  The author mentioned that he had several strategies for doing
this and wrote in the .DOC file that you could contact him at
     Mark C. DiVecchio
     10435 Mountain Glen Terrace
     San Diego, CA  92131
     619-566-6810
     BBS: 619-741-3412

greg@dekalb.UUCP (Greg Philmon) (09/01/89)

In article <2851@cbnewsc.ATT.COM> santol@cbnewsc.ATT.COM (shawn.r.antol) writes:
>In article <197@infovax.UUCP>, ao@infovax.UUCP (Anders Ohlsson) writes:
>> 	Does anybody know if there is a TSR program or some
>> 	other stuff that is capable of taking care of the
>> 	output to LPT1 and redirecting it to a disk file.
>> 					Anders Ohlsson
>
>If such a creature exists, please post it to the net so that the
>rest of us might benifit too.  'Course with the way c.b.i.p has been
>lately, you might be able to write one before the net sees it =)

	Well, you realize that this is gonna get me flamed... but who
	cares? 

	Here you go, PNR2FILE.COM from PCMag.  

	Usage:  PRN2FILE [d:] [path] [filename]
	        This directs all data written to LPT1 the specified
		file.  If no file is given the data is redirected to
		LPT1.

begin 600 prn2file.com
MZ8@"4%).,D9)3$4@,2XP("AC*2 Q.3@W(%II9F8@0V]M;75N:6-A=&EO;G,@
M0V\N)!I4;VT@2VEH;&ME;DQ05#$@4F5D:7)E8W1E9"!T;SH@)$EN=F%L:60@
M9FEL96YA;64N)%5S86=E.B!04DXR1DE,12!;<&%T:%U;9FEL96YA;65=6R]0
M;EU;+T)N;EU;+U5=)$UE;6]R>2!!;&QO8V%T:6]N($5R<F]R+B1#86YN;W0@
M56YI;G-T86QL+B104DXD#0HD#0HJ0G5F9F5R($]V97)F;&]W*@T*        
M                                !    "X[%O4!=0@N@#[O 0%T!2[_
M+M\!^R['!O !6P!6@/P!="4*Y'4X+HLV]P$N.S;Y 70L'BZ.'OL!B 0?1BZ)
M-O<!@?X !'P7+L8&] $!'E,NQ1[K 8 _ %L?=0/H>@!>M)#/G"[_'ML!+O\.
M\ %U#BZ#/O<! '0&+L8&] $!SYPN@#[T 0%U$1Y3+L4>ZP& /P!;'W4#Z$  
M"N1U [@ 3(#\0'4-@_L$=0@N@#[O 0%T!YWZ+O\NXP'[_%%25HOR+HL6]0'C
M!ZRT ,T7XOE>6EF+P9WX^\H" %!345(>!@X?Q@;T 0"X)#7H@0!3!KIR [@D
M)>AV (,^]P$ =%JZ:@:X CWH9@!R$(O8,\DSTK@"0NA8 '(\ZQ$] @!U.KD@
M +0\Z$< <BN+V+H  (L.]P&T0!Z.'OL!Z#( 'W(5.\AU$3L.^0%U"[K& ;D5
M +1 Z!H M#[H%0#'!O<!   ?6K@D)>@'  <?6EE;6,.<^B[_'N,!^\/[,L N
MHN\!S_LN@#[T 0!T ^A/_R[_+N<!N@,!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:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
M&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
7&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:
 
end
-- 
    ---------------------------------------------------------
    | Greg Philmon  ...gatech!dekalb!greg   CIS: 72261,1724 | 
    ---------------------------------------------------------

prc@erbe.se (Robert Claeson) (09/05/89)

In article <112@prodix.liu.se> jian@prodix.liu.se (Jian Hu) writes:

>I`m using STATGRAPHICS on my AT which prints HP Laser Jet graphics to LPT1.
>Since my AT is not connected to any LaserJet, I want to redirect LPT1 to a
>file and bring the diskette to another machine to print it out. I`ve tried
>a couple of programmes of the sort, including LPTX, but none of them did the
>work. It seemed that the data was lost after a certern amount has been printed
>out. Now if anyone out there can pass a hint on my problem, I should be very 
>grateful.

I have a similar problem, but with the COM1 port; I'm occasionally using
PagePlanner, a desktop-publishing kind of program (don't ask why I'm using
it instead of Ventura or PageMaker; I just have to use it for some reasons).
It produces PostScript on the COM1 port, which is usually connected to a
PostScript printer. From time to time, I need to capture that PostScript
output to a file on a diskette to send to a print shop with a photo-
typesetter that understands PostScript. PagePlanner has no way to redirect
the output to anything but COMx, and the print shop doesn't have PagePlanner.
I'd be most interested in get to know about a program of some kind that can
capture the output sent to the COM1 port and place it in a file.

-- 
          Robert Claeson      E-mail: rclaeson@erbe.se
	  ERBE DATA AB

vgopal@cbnewsc.ATT.COM (venu.p.gopal) (09/05/89)

In article <231@orchid.warwick.ac.uk> ecctp@warwick.ac.uk (Dr J A K Cave) writes:
>I made a collection of such programs last year when trying to get PS output
>printed on our remote Laserwriters.  There is even one that comes free but

You should be able to capture the postscript output of most programs into
files using the program itself... most of them allow one to do so.  I do
this all the time with WordPerfect, VP-Graphics and other programs.  One
exception seems to be lotus 1-2-3, though.  However, there are two ways there -
you can read the file into WP and get WP to output postscript.  Or you can
use a postscript screen-dump program like SCRtoPS to capture it into a file.
Actually, there is a third way.. you can read the postscript output of SCRtoPS
into WP and then get WP to print it :-)

Venu P. Gopal   UUCP: ..!att!ihuxy!vgopal   Internet: vgopal@ihuxy.att.com
BITNET: com%"vgopal@ihuxy.att.com"   or   com%"vgopal%ihuxy@research.att.com"
Silence those silent letters, save the world 500 million keystrokes a day.