Printing port question

M

Mistoffolees

Gordon said:
I have a series of dBase programs (DOS) that are almost as old as I am. I
am able to execute them in Windows 2000 via Start\Run. The HP printer that
I am using has both parallel port and USB connections. When I print from a
dBase program, it uses the parallel connection (through LPT1, I believe).

Since I would suspect that the newer printers on the market have only USB
connections, is it possible to print, using a DOS-based program, through a
USB connection? I am assuming that dBase defaults to the LPT1 port. Is
there a way to trick the program so that it prints through a USB port?

For some of the programs, I do not have the original source code, although I
don't know if that would be of any value to me. I don't look forward to
redesigning the programs, written some fifteen years ago, since their
propose is as valid today as it was back when they were developed. Seems
like make-work. Of course, I could always have two printers plugged in (one
having the parallel port connection), but that only defers the problem.

Although this could be construed as a dBase-related problem, I am hoping
that someone who is familiar with printer ports, etc. might be able to
provide me with a fix.

Thanks in advance.

Gordon Biggar
Houston, Texas

FYI, there is nothing better than the old Borland dBase V for DOS.
It is still faster than anything in Windows, more versatile than
Visual FoxPro, and its compilers make SQL report generation easier
than SyBase. And there will always be parallel printers on LPT1...
the high end stuff does not disappear quickly. Nothing wrong with
keeping a machine around just to get the job done...we do, with
archived computers still running MS-DOS through Windows XP and
even an ancient black-ribbon, wide-bed line-printer.

As for printing with a USB printer...the programming does not exist
to convert the output for an USB printer in DOS. Remember, USB wasn't
even around during that time.
 
G

Gordon Biggar

I have a series of dBase programs (DOS) that are almost as old as I am. I
am able to execute them in Windows 2000 via Start\Run. The HP printer that
I am using has both parallel port and USB connections. When I print from a
dBase program, it uses the parallel connection (through LPT1, I believe).

Since I would suspect that the newer printers on the market have only USB
connections, is it possible to print, using a DOS-based program, through a
USB connection? I am assuming that dBase defaults to the LPT1 port. Is
there a way to trick the program so that it prints through a USB port?

For some of the programs, I do not have the original source code, although I
don't know if that would be of any value to me. I don't look forward to
redesigning the programs, written some fifteen years ago, since their
propose is as valid today as it was back when they were developed. Seems
like make-work. Of course, I could always have two printers plugged in (one
having the parallel port connection), but that only defers the problem.

Although this could be construed as a dBase-related problem, I am hoping
that someone who is familiar with printer ports, etc. might be able to
provide me with a fix.

Thanks in advance.

Gordon Biggar
Houston, Texas
 
D

Davide Guolo

Dear Mr. Biggar,
Since I would suspect that the newer printers on the market have only USB
connections, is it possible to print, using a DOS-based program, through a
USB connection? I am assuming that dBase defaults to the LPT1 port. Is
there a way to trick the program so that it prints through a USB port?

For some of the programs, I do not have the original source code, although
I
don't know if that would be of any value to me. I don't look forward to
redesigning the programs

you may want to have a look at Printfil to capture the DOS LPT1: output and
forward it to any printer installed on your Windows machine (including USB,
GDI and virtual printers) without rewriting your programs and with many
extras.

You can find more info and a free trial version to download at
http://www.printfil.com

Please note that with dBase you may also avoid capturing the LPT1 output by
changing a single line of code (where you still have the sources) this way:

SET DEVICE TO PRINT
SET CONSOLE OFF
SET PRINTER ON
SET PRINTER TO ("C:\My_Dir\Filename.txt") // This is the line
....
.... @ x,y say ... normal printing commands
....
SET PRINTER OFF
SET CONSOLE ON
SET DEVICE TO SCREEN
SET PRINTER TO

Then you only have to set the "File to Check" field in the Printfil's
configuration dialog as c:\my_dir\filename.txt to have your dBase print
jobs automatically captured and printed by Printfil to your preferred
Windows printer.

Kind regards,

Davide Guolo
aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
@Kill - Batch Close Windows Applications - Freeware
http://www.aswit.com/akill
--------------------------------------------------------------
 
D

Davide Guolo

Dear Mr. Biggar,
Since the main program is in a compiled state (I do not have access to the
source), could I precede this dBase program, perhaps in a batch
environment,
by running a short introductory program containing only changed printer
output commands, or will these commands revert to default settings after
the
program closes out, and prior to the running of the main program?

normally Printfil starts at the PC bootup and stay resident in the tray
area. It activates automatically when it finds a print job to forward to a
Windows printer. You don't need to start/stop it by batch files or add other
stuff to your own applications.
And, excuse my ignorance, but the C:\My_Dir\Filename.txt command refers to
?

the "SET PRINTER TO" command is dBase syntax. It's used to choose the
destination device.

Normally DOS jobs are sent to "LPT1:", but with that command you can choose
to send them to "LPT2:", "LPT3:" or even to a file on disk.

Printfil can capture the DOS LPTx output (please see Chapter 7 in the manual
at http://www.printfil.com/manualen ) or directly the ascii file created by
your own application (in this case less configurations are required; you
just need to point Printfil to the file, by the "File to check" field in the
configuration dialog)

You can test all this yourself, by downloading the free trial version you
can find at http://www.printfil.com

For any further question, please do not hesitate to contact us directly, by
the "Help->Contact Support" Printfil's menu entry or at
http://www.printfil.com/esupp.htm

Kind regards,
Davide Guolo
aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
@Kill - Batch Close Windows Applications - Freeware
http://www.aswit.com/akill
--------------------------------------------------------------
 
G

Gordon Biggar

When we wrote the programs back in the early nineties, we would watch them
manipulate the common stock data bases on our Compaq desktops (40 mb hard
drives) with lightening slowness. With today's faster chips, the
calculations are just about complete after hitting the Enter key!

Looks like we will keep our maturing printers around for a while. Thanks
for the response.

Gordon Biggar
 
G

Gordon Biggar

Sir M. Davide --

Now, this intrigues me! I may be back with more questions as I dig into
this.

Since the main program is in a compiled state (I do not have access to the
source), could I precede this dBase program, perhaps in a batch environment,
by running a short introductory program containing only changed printer
output commands, or will these commands revert to default settings after the
program closes out, and prior to the running of the main program?
(Did I lose you on that one?)

And, excuse my ignorance, but the C:\My_Dir\Filename.txt command refers to ?
(In my case, sometimes a little knowledge is a dangerous thing...)

Thanks for your inputs!

Gordon Biggar
 
G

Gordon Biggar

Davide --

I have downloaded the trial software, as you suggested, and I will read up
on same over the weekend. I also put together a test dBase III-Plus
program to see if I could capture the essence of your message.

I am aware that the command Set Printer To (dBase) defaults to LPT1.
However, I am missing something when you refer to the use of
My_Dir\Filename.txt (it's no doubt my ignorance...). Is Filename the
intended repository for the printed output generated by the dBase program?
(I presume that the My_Dir folder would first have to be created.) However,
I am running into syntax errors when trying to write the Set Printer To ....
statement. (This could be a function of the version of dBase that I am
using.)

Perhaps this weekend I will try Printfil's email Help support. The concept
intrigues me, regardless of my level of (non)expertise!

Gordon Biggar
 
D

Davide Guolo

Gordon,
Is Filename the
intended repository for the printed output generated by the dBase program?
yes.

(I presume that the My_Dir folder would first have to be created.)
right.

However,
I am running into syntax errors when trying to write the Set Printer To
....
statement. (This could be a function of the version of dBase that I am
using.)

You may probably have to put the string inside brackets. Please check the
syntax for SET PRINTER TO into your dBase manual.

Please contact us directly for faster support.

Regards,
Davide

aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
@Kill - Batch Close Windows Applications - Freeware
http://www.aswit.com/akill
--------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top