HELP - Really, really simple printer questions 
Author Message
 HELP - Really, really simple printer questions

I've checked with the online MS Knowledge Base and couldn't find an aswer.  It
seems like a simple problem and I'm just missing something.

I've got a simple routine that spits out 200 lines to a priner:

For i = 1 To 200
    Printer.Print "Line: " & i
Next i

My problem is that no matter if I print it to an HP laser printer or an old dot
matrix, it does the form feed correctly after the first pages, BUT the next
line is missing.  
So I'd see:

Line 62

Line 64

How do I correct that?

Ideally I wouldn't like any form feeds or anything, because I'm writing a
routine that prints out index cards on a continuous form tractor feed.  The old
days of dealing directly with the lpt1 port are gone I guess.

So I suppose another question is how to prevent the Printer object from sending
end of page commands, end of docs, etc.?  All I'm issuing is the Printer.Print
command and it still manages to skip at line at the form and a final form feed
at the end of the loop -- ends up wasting index cards.

Any help would be appreciated.



Sat, 18 Aug 2001 03:00:00 GMT  
 HELP - Really, really simple printer questions
In this case, don't use the printer object at all.  Open the printer port as a
file, and print directly to that:

    Dim fh As Integer, i As Integer
    fh = FreeFile
    Open "LPT1" For Output As #fh
    For i = 1 To 200
        Print #fh, "Line " & i
    Next i
    Close #fh

On my LaserJet 4V, that code printed 60 lines per page, and didn't skip or
lose any lines.

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner


Quote:

>I've checked with the online MS Knowledge Base and couldn't find an aswer.  It
>seems like a simple problem and I'm just missing something.

>I've got a simple routine that spits out 200 lines to a priner:

>For i = 1 To 200
>    Printer.Print "Line: " & i
>Next i

>My problem is that no matter if I print it to an HP laser printer or an old dot
>matrix, it does the form feed correctly after the first pages, BUT the next
>line is missing.  
>So I'd see:

>Line 62

>Line 64

>How do I correct that?

>Ideally I wouldn't like any form feeds or anything, because I'm writing a
>routine that prints out index cards on a continuous form tractor feed.  The old
>days of dealing directly with the lpt1 port are gone I guess.

>So I suppose another question is how to prevent the Printer object from sending
>end of page commands, end of docs, etc.?  All I'm issuing is the Printer.Print
>command and it still manages to skip at line at the form and a final form feed
>at the end of the loop -- ends up wasting index cards.

>Any help would be appreciated.



Sat, 18 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Really really stuck on this one. (QBasic Question)

2. This is a really really dumb question.

3. Really, really stupid question.

4. Really, Really Horrible question about sprites

5. Help, really simple question w/ Regular Expressions

6. Search -- Really really need help

7. Really simple question

8. Really simple question...

9. really simple DB question, i think

10. Really simple DB question...

11. Really simple SQL Question

12. really simple question

 

 
Powered by phpBB® Forum Software