Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Label printing on a dot matrix printer.


Label printing on a dot matrix printer.

Closed Thread
  #1 (permalink)  
Old 06-21-04, 12:39 PM
Brian Walsh Brian Walsh is offline
New Member
 
Join Date: Jun 2004
Location: Scotland
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Label printing on a dot matrix printer.

I'm trying to print labels from VB6 on a dot matrix printer over a network.

At the end of my little routine I use printer.endoc to send the job to the printer. This sends the text for the label but also adds a form feed which pushes a whole pile of labels out of the printer.

Is there any way to suppress the form feed?

Hope you can help!
  #2 (permalink)  
Old 06-23-04, 01:09 PM
Smeagol Smeagol is offline
New Member
 
Join Date: May 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Brian Walsh
I'm trying to print labels from VB6 on a dot matrix printer over a network.

At the end of my little routine I use printer.endoc to send the job to the printer. This sends the text for the label but also adds a form feed which pushes a whole pile of labels out of the printer.

Is there any way to suppress the form feed?

Hope you can help!
I bet if you change the .Papersize property to the size of your labels, it would not spit out extras. Check out the sizes that are available by hitting F1, there is also a user-defined .papersize code, that should do it.
  #3 (permalink)  
Old 06-28-04, 12:07 PM
Brian Walsh Brian Walsh is offline
New Member
 
Join Date: Jun 2004
Location: Scotland
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Smeagol
I bet if you change the .Papersize property to the size of your labels, it would not spit out extras. Check out the sizes that are available by hitting F1, there is also a user-defined .papersize code, that should do it.
Thanks for the suggestion. Here is some more info:

There is no .papersize corresponding to the labels I am using but I thought I'd try it anyway. I included three debug lines like this:

Debug.Print Printer.Papersize
Debug.Print Printer.Height
Debug.Print Printer.Width

When it runs the debug window shows :

9
16832
11904

These are the values for A4 paper, which is, presumably the default, and when I print 297mm (16832 twips) of labels are ejected.

If I now precede the debug lines with:

Printer.Papersize = 11

The debug window shows:

11
11904
8384

These are the values for A5 paper and when I print 210mm (11904 twips) of labels are ejected. So far so good.

Help shows 256 as the user defined papersize but you don't set it with Printer.Papersize = 256, that causes an error. You substitute the papersize line with:

Printer.Height = 2160
Printer.Width = 5040 (My label size in twips)

Because the height and width have been set, the .Printer object recognizes that the papersize has been defined by the user and reports it as 256.

The debug window now shows:

256
16832
11904

The Printer object appears to recognise the user size requirement but has substituted the supplied height and width values with the A4 default values.

When I print 297mm of labels are ejected from the printer.

Any ideas welcome!
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printting in VB on Dot matrix printer in Character (dotted ) mode rajeshnirala Visual Basic 4 10-27-07 12:03 PM
matrix exponential ASHRAF C/C++ 4 08-03-05 09:54 PM


All times are GMT -5. The time now is 09:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.