printing

new topic     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_012F_01C2B7D7.06403CC0
	charset="iso-8859-1"

I am printing using the routines from p234.ew. I am trying to print =
columns.When I print the first column of addresses and then print the =
second column , it drops down a line before printing the second column. =
I then go and print the first column again=20
I am using these commands -----

               setPosition( Printer, colx, lineCount*fontSize[2])
          wPuts( Printer,eachrec )

This the code
-------------------------------------------------------------------------=
---

--putlist into table

 for z =3D 1 to totcols do
     thisrec =3D thisrec  + 1
   if   thisrec <=3D totRecs then
 -- get one ' line' of text
         dataline =3D getItem(List1,thisrec)
         get_pchunk()
      =20
    --position text on line rec 1 page
             pline =3D append(pline,  (Ple[1] & " " & Ple[2]))
    pline2=3D append(pline2,(Ple[3] & " " & Ple[5] & " " & Ple[6]))
    pline3 =3D append(pline3,(Ple[7] & " " & Ple[8] & " " ))
    zz =3D z
   end if
  end for
--check to see if tab le item exists
  if zz =3D 1 then
   totcols =3D 1
  end if
   -- get one 'printer line' of text
       pagewidth =3D  (floor(charsPerLine/totcols)) * h_space
      linec =3D lineCount*fontSize[2]=20
-- select starting column
  for prtcol =3D 1 to totcols  do
   if prtcol =3D 1  then
    colx =3D 10
   else
    colx =3D 1000 --(colx + (pagewidth * prtcol) )
   end if
-- place item to print
   setPosition( Printer, colx, lineCount*fontSize[2])
--move printer to position on line
for thiscol =3D 1 to totcols  do
          wPuts( Printer,pline[prtcol] )
     end for
-- print second line of info
         lineCount +=3D 1
         for thiscol =3D 1 to totcols  do
       --   if  pline2[prtcol] exist    then
 --limit second line to 25 columns
         if length(pline2[prtcol]) > 25 then
          eachrec =3D pline2[prtcol][2..25]
         else=20
    eachrec =3D pline2[prtcol]
         end if
        --    end if
-- select positgi on line
                 setPosition( Printer, colx, lineCount*fontSize[2])
          wPuts( Printer,eachrec )
         end for


------=_NextPart_000_012F_01C2B7D7.06403CC0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am printing using the routines from =
p234.ew. I am=20
trying to print columns.When I print the first column of addresses and =
then=20
print the second column , it drops down a line before printing the =
second=20
column. I then go and print the first column again </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am using these commands =
-----</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT =
face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setP=
osition(=20
Printer, colx, lineCount*fontSize[2])<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;wPuts( Printer,eachrec =
)<BR></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This the code</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--putlist into table</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;for z =3D 1 to totcols =
do<BR>&nbsp;=20
&nbsp;&nbsp;&nbsp;thisrec =3D thisrec&nbsp; +=20
1<BR>&nbsp;&nbsp;&nbsp;if&nbsp;&nbsp; thisrec &lt;=3D totRecs =
then<BR>&nbsp;-- get=20
one ' line' of text<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;dataline=20
=3D getItem(List1,thisrec)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;get_pchunk()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&nbsp;<BR>&nbsp;&nbsp; &nbsp;--position text on line rec 1 =
page<BR>&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;pline =3D=20
append(pline,&nbsp; (Ple[1] &amp; " " &amp;=20
Ple[2]))<BR>&nbsp;&nbsp;&nbsp;&nbsp;pline2=3D append(pline2,(Ple[3] =
&amp; " "=20
&amp; Ple[5] &amp; " " &amp; Ple[6]))<BR>&nbsp;&nbsp;&nbsp;&nbsp;pline3 =
=3D=20
append(pline3,(Ple[7] &amp; " " &amp; Ple[8] &amp; " "=20
))<BR>&nbsp;&nbsp;&nbsp;&nbsp;zz =3D z<BR>&nbsp;&nbsp;&nbsp;end=20
if<BR>&nbsp;&nbsp;end for</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>--check to see if tab le item=20
exists<BR>&nbsp;&nbsp;if zz =3D 1 then<BR>&nbsp;&nbsp;&nbsp;totcols =3D=20
1<BR>&nbsp;&nbsp;end if<BR>&nbsp;&nbsp;&nbsp;-- get one 'printer line' =
of=20
text<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;pagewidth =3D&nbsp;=20
(floor(charsPerLine/totcols)) * =
h_space<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; linec=20
=3D&nbsp;lineCount*fontSize[2] </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- select starting column</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;for prtcol =3D 1 to =
totcols&nbsp;=20
do<BR>&nbsp;&nbsp;&nbsp;if prtcol =3D 1&nbsp; =
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;colx=20
=3D 10<BR>&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;colx =3D =
1000 --(colx +=20
(pagewidth * prtcol) )<BR>&nbsp;&nbsp;&nbsp;end if</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- place item to=20
print<BR>&nbsp;&nbsp;&nbsp;setPosition( Printer, colx,=20
lineCount*fontSize[2])<BR>--move printer to position on =
line</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>f</FONT><FONT face=3DArial size=3D2>or =
thiscol =3D 1 to=20
totcols&nbsp; do<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;wPuts(=20
Printer,pline[prtcol] )<BR>&nbsp;&nbsp;&nbsp; &nbsp;end for</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- print second line of =
info</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;lineCount +=3D 1<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;for thiscol=20
=3D 1 to totcols&nbsp; do<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; --=20
&nbsp;&nbsp;if&nbsp; pline2[prtcol]=20
exist&nbsp;&nbsp;&nbsp;&nbsp;then<BR>&nbsp;--limit second line to 25=20
columns<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if =
length(pline2[prtcol])=20
&gt; 25 then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;eachrec =3D=20
pline2[prtcol][2..25]<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;else=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;eachrec =3D pline2[prtcol]</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end=20
if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp; =
end=20
if</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- select positgi on=20
line<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT =
face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setP=
osition(=20
Printer, colx, lineCount*fontSize[2])<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;wPuts( Printer,eachrec =
)<BR>&nbsp;&nbsp;&nbsp;=20

------=_NextPart_000_012F_01C2B7D7.06403CC0--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu