You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
With all the times we see this post (printing to Windows printer from MS-DOS), it's hard to believe there isn't a utility which works something like...
Code:
PrintMyfile.exe inifile.ini
Where 'inifile' might look like
Code:
[SETUP]
Filename=filename
Wide=8.5
High=11.0
TopMargin=.75
LeftMargin=.40
Font=Times New Roman
...
[ESCAPES]
BoldOn=[boldon]
BoldOff=[boldoff]
.....
You could SHELL this program from your DOS program passing the INIFile name (which you can build dynamicially).
... ????
MCM
[This message has been edited by Michael Mattias (edited July 27, 2006).]
What is DOSPrint?
DOSPrint is software which captures LPT ports to any print queue.
(Requires Windows NT 4.0, 2000, or XP - Windows 9x is not supported)
· DOSPrint can capture LPT1-LPT9 to any local or network print queue.
· Local print queues do not need to be shared.
· Capture directly to NDPS printers without requiring a legacy NetWare print queue.
· Capture directly to local LPT, USB, or TCP/IP printers without requiring sharing.
· Runs in the system tray for easy access.
------------------
Regards,
Bob
--------
Composed with EZ-Post!
Originally posted by James Horner: I really need to send stuff to the printer!
If your program outputs to LPT1 or LPT2, why not use the well known and widely available prn2file.com utility which works with console apps in XP. It could save you a lot of coding!
I think you might have to make sure what's on LPT1: (which is where LPRINT goes) is NOT a "windows only" printer.
If what you are printing is a text file (or may as well be), might be easiest to...
- Change all those LPRINTs to "PRINT #hFile," where hFile IS a genuine disk file. (Global search and replace, add an OPEN and a CLOSE and you're done).
- When done printing a document or page (whatever application requires), SHELL to some Windows utility program (e.g, notepad will print a text file from command line) and have that program handle the printing.
This has become bizarre.
I've posted in the past few days questions about some PB DOS 3.2
programs which ran on my Win ME machine but won't run on
a new Win XP Pro machine.
After a few hours of trial and error stuff, I discovered that
if I change all "LPRINT" commands to "PRINT" commands
the program works perfectly!
With "LPTINT" commands when I "RUN" the DOD windw goes blank
]and nothing happens and the machine is locked up.
Can anyone help me understand this and how I can correct it?
I really need to send stuff to the printer!
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: