FAQ for Our PRODUCTS for using DOS programs to PRINT to any Windows supported Printers Frequently Asked Questions
Find the ANSWER Here
Q1: How can I use your program to print to HP-xxxC (Windows Only Printers).

A1: It is pretty simple IF your DOS program can print to a FILE, (and most can easily do this).
a. Simply direct your printer output to a FILE (using EPSON printer control characters).
b. Once the "printer file" is on the disk, then simply CALL our program, along with the "file name" and viola...your DOS programs output file is now printing on the WindowsOnlyPrinter (uses the Windows default printer).
Ex: Call DOSPRINT C:\MyDocs\QAREPORT.txt

You can even call the DOSPRINT program from your DOS program via our WINLINK module to "streamline" the operation, or use a DOS "batch" job to launch the WIN printer function.

NOTE: The first application that we converted only required changes to about 6 lines of code...(we were already using ESC-2 printer controls).

Q2: How do I print (filename: QAREPORT.txt) to the a printer attached to LPT2, using the Windows Printing System:
A2: DOSPRINT QAREPORT.txt,LPT2

Q3: How do I send it (filename: QAREPORT.txt) to a network printer?
A3: DOSPRINT QAREPORT.txt,\\SERVER\LASERJET

Q4: Is there any facility to specify the number of copies?
A4:DOSPRINT QAREPORT.txt,,5
(This prints 5 copies of the QAREPORT.txt, located in the same directory as )

Q5: Can I direct the output to a printer port AND set copies?
A5: DOSPRINT QAREPORT.txt,LPT2,3
(This prints 3 copies, to the LPT2 printer port)

Q6: How can I use Q&A to redirect my print output to a FILE?
A6: On page 2-9 of the QA User Manual, it mentions installing a printer to print to a FILE (rather than a LPTn/COMn port selection). Later in the documentation (page 5-73), it says if you just print to DISK with your normal printer installation set to a LPT/COM PORT, the margins, spacing, justification are maintained, however, the "printer control enhancements" (BOLD, italics, etc.) will be lost.

HOWEVER, the "easy" solution is to "define" a PRINTER (PRINTER-D) with its output PORT directed to FILE, (page 7-4, PORT SELECTION), then the printer control codes are "saved" within the document...
Now it is ready for DOSPRINT.

Q7: How do I set "compressed print", NLQ and/or "landscape mode" in my Basic program?
A7: I have the answer to your question...most of it is found in the DOSPRINT.INC file, which decribes many of the Epson ESC characters to control the printer output.  Also, see the "source code" for the SAMPLE.exe/bas, which should be a big help to show how the sample program generates it's printer output.

SO, your application just needs to insert the "NLQ, draft mode, or landscape mode" characters in the beginning of your print file, then your "font face" selection, and then your "font size" selection at the beginning of your printer output file

SEE the .INC file for all pre-defined varible names:
dpNLQ$           = CHR$(27) + CHR$(120) + CHR$(49)
dpDraft$           = CHR$(27) + CHR$(120) + CHR$(48)

dpLandscape$    = CHR$(27) + CHR$(34) + CHR$(83)

Example Print Statement:
PRINT #hFile, dpLandscape$ + dpFontRomanT$ + dpBlack$ + dp8PtFixed$ + dpCRLF$ + dpCRLF$ + "e.g. This is Landscape, TmsRoman in BLACK, at 8 points (small), followed by 2 new blank lines"


-OR- Another example for the SAMPLE.bas file
PRINT #hFile, dp10CPI$ + dpCRLF$
PRINT #hFile, dpItalic$ + dpBlue$ + "Blue italic too?"


Hope this helps!




Go HOME Button





This page has been accessed times.

STB-Search™ Professional Edition - Simply the Best!
© Page Design and Copyright 1999-2005 by Simply the Best, Inc. and Conductive Software Systems
All rights reserved.