|
-
September 2nd, 2001, 07:44 PM
#1
how to make a *.prn file?
A .prn file is just a dump of what is sent to the printer when we ask the computer to print, so i think there should be some win32API functions to do that. i know how to print a *.prn file, just use these printer spooler function as follows:
openprinter
startdocprinter
StartPagePrinter
writeprinter
EndPagePrinter
EndDocPrinter
ClosePrinter
the problem is how i can make a standard *.prn file with win32 API and save to disk, so i can call a general procedure to print it at appropriate time?
-
September 2nd, 2001, 10:31 PM
#2
Re: how to make a *.prn file?
I don't know about API, but you could 'Add New Printer' and when it asks for which port, pick 'FILE:'. It will ask you for a file name each time you print to this printer. I tried it out setting up a 'GENERIC/TEXT ONLY' and the .prn file seems to be just a text file with the .prn extention. I would think you could just create this file with an 'OPEN xxx.prn for OUTPUT AS #1' and print to it.
David Paulson
-
September 3rd, 2001, 04:58 AM
#3
Re: how to make a *.prn file?
thanks for your help.
but how to "add new printer" and set the printer port as "FILE" with VB?
and, if i want to printer a picturebox's content which can implement with printer object as :
printer.paintpicture picturebox1.picture, ...
but i can't print it to a file.
chen1207
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|