Re: Controling dot-matrix printer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Because a DC can be drawn on randomly, there is no way to use a DC-based printing solution
that will print "immediately". I'm not sure that you can't fool it, but I suspect that
there is enough going on under the floor that ending a page implicitly forces a page
eject.

In the case of the label printer, we had to deal with issues about font sizes,
particularly if the address lines were long, and the original MS-DOS program took care of
all of this. It handled a couple different label formats, and had special features to
allow us to do printer alignment so the labels were properly printed; it overrode the
printer's page-eject mechanism so we could use continuous-feed labels, and there were many
other bells and whistles. The program worked for precisely one model of printer from one
manufacturer. The printer is unbelievably reliable, and is now 25 years old, still going
strong. So portability and device-independence were not issues we were overly concerned
with. That's what you have to give up if you want to manipulate the printer directly.
Perhaps there is a "compatible, device-independent" solution, but I'm not aware of one at
the moment. But if you're willing to give up device independence, just open the LPT
device and write to it using WriteFile, writing the raw bits.

I'm not sure Windows supports an intermediate position.
joe

On Sat, 02 Dec 2006 09:35:52 +0800, Justin <justin1021@xxxxxxxxx> wrote:

Jonathan Wood ????:

Thanks.

I had used the printing DC to print data, but it always print one page
by one page. What I want to do now is to print just one line of a page.
For dot-matrix printer, it will just output one single line, and the
page will remain on the printer for next line. If I use printing DC,
then it will print the whole page out.

In the general case, you can simply print to the Windows device context for
any printer supported by Windows and it should work. Did you try this? What
is wrong with it?

If you need to programmatically control a specific printer--I can't image
why you'd need to do this--you need to get a reference for *that* printer so
you know which codes have what affect.

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Slow barcode printing
    ... It take one seconde per label. ... on windows 2000, all the label were printing way much faster. ...
    (microsoft.public.windows.server.general)
  • Re: printing not according to page range selected
    ... Word MVP web site http://word.mvps.org ... > I have created a label list with 600 pages but when i test print page ... > only print out according to layout by printing in small batches e.g. ...
    (microsoft.public.word.docmanagement)
  • Re: HP2575 not printing labels correct?
    ... When printing docs or picts, all seems to be somehow normal. ... I've had the same problem with a deskjet 3845...The preview, or a print on plain paper is fine, but the label sheet has the printable area positioned differently, so the top and bottom of each label may spill onto the next. ... As far as I can tell this is due to the thicker stock, and possibly due to the slippery backing sheet. ...
    (comp.periphs.printers)
  • Re: Slow news day?
    ... This gets round some potential problems, but what I can't see is if ... printing others? ... queue anyway you might as well not pay the price of the label and ink as ... Double pah! ...
    (uk.media.radio.archers)
  • Re: Printing CDs on Epson R1800 using Avery AfterBurner
    ... >I designed a CD label using Avery's AfterBurner CD label printing software. ...
    (comp.periphs.printers)