Printing directly to LPT1: - bypassing the printer driver 
Author Message
 Printing directly to LPT1: - bypassing the printer driver

I would greatly appreciate any on this problem:

For years I have been happily printing away (in VB 3) to networked HP
Laserjets.  I don't use the printer object - I pass the raw printer codes to
the printer like this:

OPEN "LPT2.PRN" FOR OUTPUT AS #2
PRINT #2, CHR$(24)+"E"      ' Init laserjet
etc.
CLOSE #2
I control cursor positioning, fonts etc. with a set of functions that produce
the appropriate PCL control codes.   I was thus able to move  over a lot of QB
4.5 code with no work at all.

The problem:  now I want to print to a local printer (to make some labels on
an Epson compatible dor matrix printer).  I tried:

OPEN "LPT1.PRN" FOR OUTPUT AS #1

and get a 'Path/File access error'.  Why?  How come it works for LPT2 but not
LPT1?

Many TIA

Bill Trembath

North Vancouver, B.C.
Canada



Fri, 18 Aug 2000 03:00:00 GMT  
 Printing directly to LPT1: - bypassing the printer driver

try this:  OPEN Printer.Port FOR OUTPUT AS #2

then you can:
Print #1, Space(10) & "DEPO Report for:  " & Site & "  for the month of:  " &
Month
Print #1, Space(10) & String(60, 95)
Print #1, vbCrLf
or whatever else you'd like to do...

HiH's
Cliff

Quote:

> I would greatly appreciate any on this problem:

> For years I have been happily printing away (in VB 3) to networked HP
> Laserjets.  I don't use the printer object - I pass the raw printer codes to
> the printer like this:

> OPEN "LPT2.PRN" FOR OUTPUT AS #2
> PRINT #2, CHR$(24)+"E"      ' Init laserjet
> etc.
> CLOSE #2
> I control cursor positioning, fonts etc. with a set of functions that produce
> the appropriate PCL control codes.   I was thus able to move  over a lot of QB
> 4.5 code with no work at all.

> The problem:  now I want to print to a local printer (to make some labels on
> an Epson compatible dor matrix printer).  I tried:

> OPEN "LPT1.PRN" FOR OUTPUT AS #1

> and get a 'Path/File access error'.  Why?  How come it works for LPT2 but not
> LPT1?

> Many TIA

> Bill Trembath

> North Vancouver, B.C.
> Canada

--
****************************************
NOTICE TO BULK EMAILER(S):
Pursuant to US Code, Title 47, Chapter
5, Subchapter II, 227, any & all
unsolicited commercial e-mail sent to
this address is subject to a download
and archival fee in the amount of
$500 US and copies will be forwarded
to domain administrators--E-mailing
denotes acceptance of said terms!
****************************************

  vcard.vcf
< 1K Download


Fri, 18 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printing Directly to LPT1 avoiding the printer object.

2. Help, How to send printer command to printer bypassing printer driver in vb

3. Directly print to LPT1

4. Bypassing Windows Printer Drivers

5. Bypassing Windows Printer Drivers

6. Bypassing Windows Printer Drivers

7. Bypassing Printer driver to send ESCAPE Codes

8. How to bypass the Print to File Dialogbox (when printer is set to print to file)

9. Bypassing Print Drivers

10. WritePrinter, OpenPrinter APIs (Bypassing print driver)

11. Printing directly to printer w/o using Print Manager

12. Printing a report when no printer or print drivers are installed on the server

 

 
Powered by phpBB® Forum Software