PCBUILD Archives

Personal Computer Hardware discussion List

PCBUILD@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Gillett <[log in to unmask]>
Reply To:
PCBUILD - Personal Computer Hardware discussion List <[log in to unmask]>
Date:
Sat, 9 Aug 2003 12:56:14 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
On 7 Aug 2003, at 20:24, Tom Glab ([log in to unmask]) wrote:

> I am writing some programs in basic and need to send the escape code to the
> printer to have it switch from portrait to landscape and then back again
> from within the program. I have several Epson and Panasonic printers but non
> of the documentation shows the escape control codes for landscape and
> portrait. One Epson is C40UX and a panasonic is KX-P2123.
>
> The printers will print landscape if it is selected from print setup within
> a Windows program, by checking the appropriate box, but I need to do it from
> within a dos basic program using control codes.
>
> If there are no codes, is there perhaps a utility that can be called from
> within the basic program. I suspect this problem also occurs when writing
> from visual basic which I am just starting to learn.
>
> Thanks in advance
>
> Tom Glab
>
<Massive quoted material about XP Activation snipped....>

  You're trying to mix two very different generations of PC printing
technology, and it's not going to work.

  In the old generation, a printer receives a stream of bytes.  Most bytes
ared decoded to a matrix of dots which forma character and its surrounding
space, and those get sent to the print head, one column at a time, as it
moves across a row on the paper.
  In the new generation, "printing" is done by drawing to a virtual window
in the computer memory to form the pattern of black and white dots, and then
the dot patterns are sent to the print head without any decode step in the
printer.

  In the new generation, landscape vs. portrtait controls the order in which
dots are read from the virtual window and sent to the printer.  The print
head still moves back and forth and the paper feeds through it.  The human
is smart enough to rotate the printed page 90 degrees if necessary.
  In the old generation, landscape mode involved bying a wider printer
version that could accomodate paper 11 or even 14 inches wide, usually
perforated at 8.5 inches high, or using an escape sequence to put the
printer into "compressed" mode where the head would move a bit less for each
column of dots, resulting in 11 inches worth of text squeezed onto an 8.5
inch line.

  Bottom line is that when a Windows print dialog offers you the choice of
landscape or portrait mode, it's not going to send some magic escape code to
the printer -- it's going to just affect the order in which Windows reads
the dots out of the virtual window to go to the print head.  (There are
printers where the virtual window is implemented in the printer instead of
the PC; these accept commands in PostScript or (possibly) Windows drawing
commands, not text characters and escape codes.)

David Gillett

               The NOSPIN Group Promotions is now offering
              Mandrake Linux or Red Hat Linux CD sets along
             with the OpenOffice CD...  at a great price!!!
             http://freepctech.com/goodies/promotions.shtml

ATOM RSS1 RSS2