Solved

send print capture file to the printer

Posted on 1998-04-10
18
238 Views
Last Modified: 2013-12-29
In Windows the output to a printer can be redirected to a file.

So far, I did not find a way to send this capture file to the printer for the printout (maybe later or on a different machine that does not have the original application installed.

What did I miss??
0
Comment
Question by:thommy031498
  • 6
  • 4
  • 3
  • +2
18 Comments
 
LVL 7

Expert Comment

by:busuka
ID: 1710937
Actually it's VERY simple. From DOS prompt type (if capture file CAPFILE.PRN):
COPY/B CAPFILE.PRN PRN

That's it.
0
 
LVL 2

Expert Comment

by:happy1
ID: 1710938
Hi, Thommy

 I think I know what U miss:)
From your question, I understand -
U want use (share) .prn files on (between)
DIFFERENT  machines and if possible
do that in Windows? If yes, heres some info.

 I think it should be explained that "prn" does not denote any
particular data format, since it seems like a lot of people aren't
clear on that point.  All it means is "data for some printer."  Only
printers which understand the same print language can print
each other's prn files (correctly), and even then there tends to
be a lot of formatting difficulties between two different printers
that understand the same set of codes (differing page sizes,
density capabilites, and so on).
Basically .prn file is just a disk image of the file that goes to the
printer.

  If you have a Windows machine, you can use GhostScript to
view and print. Also, I've never tried it and have no idea if it'll
work, but if you have a PostScript printer set up on a Win95
machine, you might be able to print the file by making a copy
and dragging it directly to the print queue.

 Or U can use other 3rd party programs, example - Imprint,
shareware, below 30$. Install it on your machines and put
link to prg in your SendTo folder.

This is from Imprints readme:
 Imprint is a windows utility that allows users to print text files,
including programers' source files, html documents, ASA
(Fortran) output etc.
 Imprint can also be used for sending postscript and binary
files directly to a printer. This is particularly useful for printing
".prn" files, created using the "Print to file" option in many
applications.

If that sounds interesting, U can download prg here:
http://www.hotfiles.com/?000P7Q

Regards, Happy1

0
 
LVL 14

Expert Comment

by:smeebud
ID: 1710939
Ok thommy, you don't have to spend any money.
I've got two answers for you. Now you and me will be the only two people in the world that knows how to do this; and happy of course::))
-------
1.From a Dos Window, C:\>
In this exampe I'll use PRINT.PRN IN DIRECTORY 2 [C:\2]

YOU WOULD TYPE AT THE C:\>

C:\>PRINT C:\2\PRINT.PRN LPT1 [enter]

The lpt1 is my printer port. You would substitute LPT1 for you printer port.
It well may be the same.
----------
2. For making .prns to .txt, eliminating the prn altogeather..
If you are running Win95 (any version) go to start-settings-printers, click add printer and add the printer Generic/Text Only (Manufacturer:Generic).  
Set this to print to FILE: and you can call thr Filname.prn to Filname.txt.
Of course you do printer setup first and choose Generic/text.

You may now reject the 1st answer and comment for me to answer so I can grab the
points. I just love points:::)))

If you have any problems let me know.
Regards
Bud


0
 

Author Comment

by:thommy031498
ID: 1710940
1. I was looking for a solution to print from Windows

2. I think I will try the shareware program


0
 
LVL 2

Expert Comment

by:gravity
ID: 1710941
How about you just transfer the *.doc file instead of useing a print file? you could also try saving the document as a rich text file...
0
 
LVL 14

Expert Comment

by:smeebud
ID: 1710942
You can print from windows with this:
For making .prns to .txt, eliminating the prn altogeather..
      If you are running Win95 (any version) go to start-settings-printers, click add printer and add the printer
      Generic/Text Only (Manufacturer:Generic).  
      Set this to print to FILE: and you can call thr Filname.prn to Filname.txt.
      Of course you do printer setup first and choose Generic/text.

Bud
0
 
LVL 2

Expert Comment

by:gravity
ID: 1710943
Give the points to smeebud...he got it!

0
 
LVL 14

Expert Comment

by:smeebud
ID: 1710944
Thanks gravity, thommy whould have to reject your answer 1st and ask for mine in a comment. here's some more for us all. I've been looking for this dran .prn answer for a year:)) Finally got it right.

Thommy, Here are severel options, basiclly the same:
----
 For making .prns to .txt, eliminating the prn altogeather..
Have you Windows 95 CD-ROM inserted.
If you are running Win95 (any version) go to start-settings-printers, click add printer
and add the printer Generic/Text Only (Manufacturer:Generic).
The next time you choose "Print to FILE" you can call the Filname.prn to Filname.txt.
Of course you do printer setup first and choose Generic/text Printer.
If you then "print" to this printer, it will create a text file.
Nice Huh!!

Files used by this printer Driver:
C:\WINDOWS\SYSTEM\TTY.DRV
C:\WINDOWS\SYSTEM\TTY.HLP
C:\WINDOWS\SYSTEM\UNIDRV.DLL
C:\WINDOWS\SYSTEM\UNIDRV.HLP
C:\WINDOWS\SYSTEM\ICONLIB.DLL
==============
From the Start menu, select Settings > Printers, the Printers window will
pop up, showing an icon for each of
the printers you have at your disposal, plus an icon called "Add Printer".
Double click on this icon.
The Add Printer Wizard window will pop up, click on Next.
Select the manufacturer and model of the printer you will eventually send the
.prn files to. Rather than scrolling
through the entire list of manufacturers, just press the first letter of their
name (e.g. H for HP) on the keyboard
and the list will jump to the manufacturers starting with that letter.
Once the correct manufacturer / printer has been selected click on Next.
Keep the existing driver for this printer, click on Next.
You will be shown a list of ports, select the one which says:
"File: Creates a file on disk", click on Next.
Enter a name for this printer, e.g. "HP Laserjet (FILE)" and select whether to
use this printer as the default,
click on Next.
Don't bother 'printing' a test page, click on Finish.
If you now 'print' to this printer a dialog asking you the name of the file to
print to will pop up.
=======
How can I print to the same file each time, without being prompted for a filename?

Short answer

Add a new local port named with a filename.
Long answer

Add a new printer that prints to the special "File:" port (see question 1).
From the printers' panel, right click on the printer you have just added
and select Properties.
A panel showing the properties for this printer will pop up, click on the
Details tab of this panel.
Click on the Add Port... button.
The Add Port panel will pop up, click on the Other radio button, and make
sure Local Port is highlighted, click
on OK.
A small panel asking for the name of the port will pop up, enter the name of
a file in the edit box, for example
C:\Output.prn.
Click on OK to dismiss the panel asking for the port name.
Click on OK to dismiss the printer properties panel.
If you now 'print' to this printer the output will be sent directly to
C:\Output.prn (or wherever), overwriting
what was there before.
=========
How do I create a simple text file when "Printing to file"?
Short answer

Use the "Generic / Text" driver.
Long answer

From the Start menu, select Settings > Printers, the Printers window will
pop up, showing an icon for each of
the printers you have at your disposal, plus an icon called "Add Printer".
Double click on this icon.
The Add Printer Wizard window will pop up, click on Next.
Now select the "Generic / Text" printer driver - press the 'G' key, the list
of manufacturers should jump to
those beginning with G, highlight the one which says "Generic".
There should only be one model for the Generic manufacturer,
called "Generic / Text Only", make sure it is
highlighted and click on Next.
Keep the existing driver for this printer, click on Next.
You will be shown a list of ports, select the one which says:
"File: Creates a file on disk", click on Next.
Enter a name for this printer, e.g. "Text File" and select whether to use
this printer as the default, click on
Next.
Don't bother 'printing' a test page, click on Finish.
If you now 'print' to this printer a dialog asking you the name of the file
to print to will pop up.

Curtesy of Jon Eva
http://www.gallicrow.co.uk

Check this out gravity and thommy. Very good site.

Regards,
Bud
0
 
LVL 2

Expert Comment

by:gravity
ID: 1710945
I don't mind....Go for it...you certainly deserve it!

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 7

Expert Comment

by:busuka
ID: 1710946
I don't understand. Why my answer was rejected ? It is simpliest and fastest way to
print captured file back on printer. You you prefer hard way, so delete this file, then
through direct HD editing, change FAT and then print it.
Sorry for sarcasm, but what a problem, just drop to DOS prompt and print this file.
0
 
LVL 14

Expert Comment

by:smeebud
ID: 1710947
Hi busuka,
I tried COPY/B CAPFILE.PRN PRN and it did not work.
What did I miss.
I found an old tip that did work,
Tip. If you print a document to a file, you can copy the print file to print to a printer. At the command prompt, type copy filename.ext /b prn

What is different here??

Regards
Bud
0
 
LVL 2

Expert Comment

by:happy1
ID: 1710948
I'm Happy:), Bud advised Thommy go to:

"..http://www.gallicrow.co.uk
Check this out ... Very good site."

Yes, good site, in their FAQ I counted at least 5 times:
"Please read about Imprint - utility for printing text and binary files"
   
Thommy, I just downloaded and checked Imprint for U.
In short - if U need it occasionally, from time to time - Busuka's
answer IS fully qualified and correct.
But if U R heavy in printing, looking for comfortable way do that
from Windows try this utility, I recommend it.
Imprint is easy 2 use, enhanced windows printing prg, very
flexible: works from Win95, Win NT and yes, from DOS window
with switches and no GUI at all.

Of course, there's no free lunch, and U must pay, if U'l find this
prg useful for your needs. On the other side - Jon Eva, author of
Imprint, is a very generous: "The full functionality will work for
thirty separate days of use (days that you actually use Imprint to
print something), after which you can either register the program,
remove it from your computer ... or request a further thirty day trial."

And just because of this - further 30 days trial by request - from
author, I will show U what 2 do if U need additional time for
evaluating this prg. This, plus some more info, like what prg will
do in your machine, or Registry I will post only if U R interested.
Let me know.

Note1: Pay for all prg U R using, programmers have families
too and they need support for their job, or U will be left with
Micro$oft and FEW "brand - names" on the software market.

Note2: This is NOT a offer for "serials", or "cracks".

Note3: I'm not connected (in any way) nor with Gallicrow
Software, nor with any other software companies.
 
Regards, Happy1
Note4: Sorry for my bad English:)

0
 

Author Comment

by:thommy031498
ID: 1710949
1. Using the generic printer can only generate a text file from the print output. But this file can not be sent to the printer.

2. I actually was looking for a way to send the print file  to the printer from WITHIN Windows. Strange, that this is not possible, so what is the point of generating .prn file?

If there is no other answer to the question, happy comes most near to my answer.
0
 
LVL 14

Expert Comment

by:smeebud
ID: 1710950
Whats the point of generating a .prn file?

I've asked myself that many times. Then you go to dos and either use PRINT OR COPY and a list of Dos commands. I still like my answer because you can either use the
"output.prn" then from a command line in windows print to paper.
Or have it made instanly into text, [my idea of a GOOD THING::))]

You can do the PRINT ??? From windows. From a pif file you create with the PRINT OR COPY syntax in the Command line box.

Regards.
Bud
0
 
LVL 7

Expert Comment

by:busuka
ID: 1710951
Bud, take a look on this:

/B
    Indicates a binary file. When the /B switch precedes the list of
    filenames on the command line, it applies to all files whose names
    follow the /B switch, until COPY encounters an /A switch, in which case
    the /A switch applies to the file whose name precedes the /A switch.

    When the /B switch follows a filename, it applies to the file whose name
    precedes the /B switch and to all files whose names follow the /B
    switch, until COPY encounters an /A switch, in which case the /A switch
    applies to the file whose name precedes the /A switch.

    The /B switch specifies that the command interpreter is to read the
    number of bytes specified by the file size in the directory. The /B
    switch is the default value for COPY unless COPY is combining files.

This is for DOS 6.22 COPY command.

Point for generating PRN file: I have only one thing (and used it many times). Point is
transfer file, ready for print, to another computer with printer.  For example: you can make
Word document on PC on home, print it to file for LaserJet printer, then transfer it by FTP
or e-mail to work, where you have good fast LaserJet and print it there (even from UNIX).
You don't need for this ANY application.
0
 
LVL 14

Accepted Solution

by:
smeebud earned 100 total points
ID: 1710952
Yes, I know busuka. i was repeting what thommy asked in his statement.
 Monday, April 13 1998 - 04:17AM PDT
Whats the point of generating a .prn file?
==============

Thommy, you can issue the commad from windows, it will still take you to a dos window however and continue on.

I've asked myself that many times. Then you go to dos and either use
PRINT OR COPY and a list of Dos
commands. I still like my answer because you can either use the
"output.prn" then from a command line in windows print to paper.
Or have it made instanly into text, [my idea of a GOOD THING::))]

You can do the PRINT ??? From windows. From a pif file you create with
the PRINT OR COPY syntax in the Command line box. You can put this icon where you like.

Regards.
Bud


 
0
 
LVL 2

Expert Comment

by:happy1
ID: 1710953
Yep, that's the benefits from .prn files.
U can transfer them anywhere and for printing
them U dont need application from which they
was created,

Only one rule to remember:
U must be using the same brand/model printer that the
file was made for, or your printer must understand the
same printer codes else you will just get garbage.

BTW,
/A           Indicates an ASCII text file.
/B           Indicates a binary file.        
( Just look inside of Command.com)

.PRN files are binary files (except those created for the
generic printer) and the /b switch is important else they
will be sent as if they were ASCII text.

Regards, Happy1

0
 
LVL 2

Expert Comment

by:happy1
ID: 1710954
Uups, I was late:
my comment was after Busuka's comment.
not Bud's answer.

Sorry,
Happy1

0

Featured Post

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now