borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (PRINTING WINDOW)Next Topic (continuous printing through Crystal Report Application) New Topic New Poll Post Reply
AndreaVB Forum : Printing : Insert line spacing
Poster Message
rajani
Level: Graduate

Registered: 25-11-2004
Posts: 9

icon Insert line spacing

Hi,

  I have a text file with number of records.
Each record is ended by vbCrLf. I want to print those records on my preprinted paper.
Ex: job    Size   Qty   Bdlno    Opr

     04A     S      10     20        1

     job     Size   Qty   Bdlno    Opr

     04A     M      11     25        2

...


So, i need line spacing b/w each row printed. Like that each page has 24 lines to be printed.
I am using printer.printquality = -2  (like dos font)
printer.fontbold=false
printer.fontname="roman"
printer.fontsize=9

...
while not objfile.atendofstream
    printer.print objfile.readLIne()
   linecount=linecount+1
   if lineCount=24 then
     linecount=1
     printer.newPage
   end if
wend

How can i set the line space. I am using Epson LQ 580 printer. I want to print bidirectional, single stroke. I have seen some codes like ESC 1 sets 8 lines per inch. I want to set 2 lines per half inch. Wat value to give. And i am not sure how to use these code and where to use.

Thanx in advance

25-11-2004 at 03:45 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Insert line spacing

Hi,
If all you want is a blank line between each printed line just insert - Printer.Print - after printer.print objfile.readLIne()
That will do the job.


____________________________
multi-tasking - the ability to hang more than one app. at the same time.

25-11-2004 at 08:48 AM
View Profile Send Email to User Show All Posts | Quote Reply
rajani
Level: Graduate

Registered: 25-11-2004
Posts: 9
icon Re: Insert line spacing

Hi,

  Thanx for the reply. I used Draft 10cpi for faster printing.
Eventhough i inserted printer.print " " to print blank line,
for every line the location is moving a bit upwards. So, after printing 5 lines, 2 records are printing at the same location i.e under one heading.

The preprinted page is equally formated. What could be the problem?


------------
Rajani

25-11-2004 at 09:51 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Insert line spacing

Hi,
Do not print a space - just Printer.Print - nothing else. That inserts a line.


____________________________
multi-tasking - the ability to hang more than one app. at the same time.

25-11-2004 at 10:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : Insert line spacing
Previous Topic (PRINTING WINDOW)Next Topic (continuous printing through Crystal Report Application) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder