1. printing
- Posted by sixs at ida.net Jan 10, 2003
- 477 views
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> </DIV> <DIV><FONT face=3DArial size=3D2> <FONT = face=3DArial=20 size=3D2> setP= osition(=20 Printer, colx, lineCount*fontSize[2])<BR> =20 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> </DIV> <DIV><FONT face=3DArial size=3D2>--putlist into table</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> for z =3D 1 to totcols = do<BR> =20 thisrec =3D thisrec +=20 1<BR> if thisrec <=3D totRecs = then<BR> -- get=20 one ' line' of text<BR> = dataline=20 =3D getItem(List1,thisrec)<BR> =20 get_pchunk()<BR> =20 <BR> --position text on line rec 1 = page<BR> =20 pline =3D=20 append(pline, (Ple[1] & " " &=20 Ple[2]))<BR> pline2=3D append(pline2,(Ple[3] = & " "=20 & Ple[5] & " " & Ple[6]))<BR> pline3 = =3D=20 append(pline3,(Ple[7] & " " & Ple[8] & " "=20 ))<BR> zz =3D z<BR> end=20 if<BR> end for</FONT></DIV> <DIV><FONT face=3DArial size=3D2>--check to see if tab le item=20 exists<BR> if zz =3D 1 then<BR> totcols =3D=20 1<BR> end if<BR> -- get one 'printer line' = of=20 text<BR> pagewidth =3D =20 (floor(charsPerLine/totcols)) * = h_space<BR> linec=20 =3D lineCount*fontSize[2] </FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- select starting column</FONT></DIV> <DIV><FONT face=3DArial size=3D2> for prtcol =3D 1 to = totcols =20 do<BR> if prtcol =3D 1 = then<BR> colx=20 =3D 10<BR> else<BR> colx =3D = 1000 --(colx +=20 (pagewidth * prtcol) )<BR> end if</FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- place item to=20 print<BR> 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 do<BR> = wPuts(=20 Printer,pline[prtcol] )<BR> end for</FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- print second line of = info</FONT></DIV> <DIV><FONT face=3DArial size=3D2> =20 lineCount +=3D 1<BR> = for thiscol=20 =3D 1 to totcols do<BR> --=20 if pline2[prtcol]=20 exist then<BR> --limit second line to 25=20 columns<BR> if = length(pline2[prtcol])=20 > 25 then<BR> = eachrec =3D=20 pline2[prtcol][2..25]<BR> = else=20 <BR> eachrec =3D pline2[prtcol]</FONT></DIV> <DIV><FONT face=3DArial=20 size=3D2> end=20 if<BR> -- = end=20 if</FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- select positgi on=20 line<BR> </FONT><FONT = face=3DArial=20 size=3D2> setP= osition(=20 Printer, colx, lineCount*fontSize[2])<BR> =20 wPuts( Printer,eachrec = )<BR> =20 ------=_NextPart_000_012F_01C2B7D7.06403CC0--
2. Re: printing
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jan 10, 2003
- 478 views
On Thu, 9 Jan 2003 12:02:46 -0700, sixs at ida.net wrote: >When I print the first column of addresses and then=20 >print the second column , it drops down a line before=20 >printing the second column. You appear to have coded: > linec =3D lineCount*fontSize[2]=20 and then: > for prtcol =3D 1 to totcols do > setPosition( Printer, colx, lineCount*fontSize[2]) > lineCount +=3D 1 > setPosition( Printer, colx, lineCount*fontSize[2]) Try using linec and only incrementing lineCount on each row. Pete
3. Re: printing
- Posted by sixs at ida.net Jan 13, 2003
- 463 views
Thanks, I reviewed my code and found the error, bad name problem. Your review helped me to review my code. Jim ----- Original Message ----- From: "Pete Lomax" <petelomax at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Subject: Re: printing On Thu, 9 Jan 2003 12:02:46 -0700, sixs at ida.net wrote: >When I print the first column of addresses and then >print the second column , it drops down a line before >printing the second column. You appear to have coded: > linec = lineCount*fontSize[2] and then: > for prtcol = 1 to totcols do > setPosition( Printer, colx, lineCount*fontSize[2]) > lineCount += 1 > setPosition( Printer, colx, lineCount*fontSize[2]) Try using linec and only incrementing lineCount on each row. Pete ==^^=============================================================== This email was sent to: sixs at ida.net TOPICA - Start your own email discussion group. FREE!