-
July 31st, 2006, 02:33 PM
#1
Print 1/3 of a page w/Dot Matrix printer
Hi All!
I have written many apps which print forms, textboxes,etc., but his latest app has me bouncing off the walls. I have an automated ticket generator for a truck scale. Imagine this: an Okidata Dot Matrix printer, which feedsthe paper via carriage wheel. Each 8.5 x 11 carbon-copy paper is actually divided into three carbon-copy tickets separated by perforations.
My problem is this: I have drawn a form which fits on each ticket(1/3 of the page) quite well. However, I cannot figure out how to make the printer feed ONLY 1/3 OF THE PAGE after each spool. What ends up happening is a whole page is fed in, and two tickets are wasted each print. Of course, I could just tell the guy to feed the paper backout after every ticket, but then he would have to worry about lining it up correctly every time.
If anyone has any ideas, I would really appreciate it
Thanks For Your Tiime
-
July 31st, 2006, 04:30 PM
#2
Re: Print 1/3 of a page w/Dot Matrix printer
What I would probably do in such a case is to use the printer's Escape codes to control printing, and send ASCII text. You can send it graphics, but that's quite a bit more work.
If you have the codes, or if you know what printers it emulates, you should be able to do it. I have usually ended up using the codes from an Epson LQ series, which is supported by many brands.
Here is an example:
Code:
Open "LPT1:" For Output Access Write As #1
Print #1, Chr(27); Chr(64); 'reset
Print #1, Chr(27); Chr(107); Chr(3); 'font
Print #1, Chr(27); Chr(77); 'pitch 12
Print #1, Chr(27); Chr(120); Chr(1); 'letter quality
Print #1, "Hello World"
Close #1
This will simply leave the paper where it stops printing. There are codes to move the paper up and down if you need to, so as long as you know the height of what you are printing, you can make sure each begins at the proper position.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
July 31st, 2006, 08:17 PM
#3
Re: Print 1/3 of a page w/Dot Matrix printer
Another thought:
If you are using Printer.EndDoc, that will force an eject. You would have to manually wait until you had 3 tickets.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|