Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

HP Laserjet 2100M printer controls HELP!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HP Laserjet 2100M printer controls HELP!

    Can somebody tell me how to print past the 80th column using HP
    PCL 6 control codes? I have a simple report in a prog I wrote
    in PB 3.5 which is supposed to print a columized list. I have
    tried EVERYTHING to get it to print past the 80th column, but
    it insists on line-wrapping. (yes, I even sent disable line wrap PCL command)
    I can successfully send control codes to enter landscape mode,
    compress the print, eject page(s), etc but the columns don't
    line up despite having a huge amount of page still available.
    I'm goin' nutty here. Here is sample code:


    OPEN "LPT2:" FOR OUTPUT AS #1
    PRINT #1, CHR$(27);"E"; 'Reset printer
    PRINT #1, CHR$(27);"&l1O"; 'Landscape mode
    PRINT #1, CHR$(27);"(s10H"; '10 CPI

    PRINT #1, "GAME SCHEDULE FOR ";Month$(M);" ";Day$;", ";Year$;
    PRINT #1, ""
    PRINT #1, ""
    PRINT #1, ""
    PRINT #1, TAB(40)"AM";TAB(63);"PM"

    PRINT #1, " 12 1 2 3 4 5 6 7 8 9 10 11 ";

    PRINT #1, "12 1 2 3 4 5 6 7 8 9 10 11 ";
    PRINT #1, TAB(24);STRING$(54, "_")

    FOR I=1 TO EndOfFile - 19
    FOR J=2 TO 26
    IF Games$(I, J)="X" THEN
    GOSUB DisplayGameDayInfo
    EXIT FOR
    END IF
    NEXT J
    NEXT I
    PRINT #1,CHR$(27);"&l0H"; 'Spit out the page(s)
    CLOSE #1 'Close LPT1
    RETURN

    DisplayGameDayInfo:
    PRINT #1, TAB(1);Games$(I, 1);
    PRINT #1, TAB(25);Games$(I,2);
    PRINT #1, TAB(27);Games$(I,3);
    PRINT #1, TAB(29);Games$(I,4);
    PRINT #1, TAB(31);Games$(I,5);
    PRINT #1, TAB(33);Games$(I,6);
    PRINT #1, TAB(35);Games$(I,7);
    PRINT #1, TAB(37);Games$(I,8);
    PRINT #1, TAB(39);Games$(I,9);
    PRINT #1, TAB(41);Games$(I,10);
    PRINT #1, TAB(43);Games$(I,11);
    PRINT #1, TAB(45);Games$(I,12);
    PRINT #1, TAB(48);Games$(I,13); 'AM/PM Split here
    PRINT #1, TAB(53);Games$(I,14);
    PRINT #1, TAB(55);Games$(I,15);
    PRINT #1, TAB(57);Games$(I,16);
    PRINT #1, TAB(59);Games$(I,17);
    PRINT #1, TAB(61);Games$(I,18);
    PRINT #1, TAB(63);Games$(I,19);
    PRINT #1, TAB(65);Games$(I,20);
    PRINT #1, TAB(67);Games$(I,21);
    PRINT #1, TAB(69);Games$(I,22);
    PRINT #1, TAB(71);Games$(I,23);
    PRINT #1, TAB(73);Games$(I,24);
    PRINT #1, TAB(76);Games$(I,25);
    PRINT #1, TAB(78);Games$(I,26); 'Heres where it wraps!
    PRINT #1,""
    RETURN

    ------------------

  • #2
    Strat,
    it's not the printer at fault. PB3.5 defaults to 80 columns on printers. Add the statement:

    WIDTH LPRINT 255

    to disable this before printing or add:

    WIDTH #1,255

    after you open the file to the printer.

    Paul.



    [This message has been edited by Paul Dixon (edited August 15, 2000).]

    Comment


    • #3
      Eureka eureka eureka!
      Thanks a ton! Prints exactly as I want it to now!

      Originally posted by Paul Dixon:
      Strat,
      it's not the printer at fault. PB3.5 defaults to 80 columns on printers. Add the statement:

      WIDTH LPRINT 255

      to disable this before printing or add:

      WIDTH #1,255

      after you open the file to the printer.

      Paul.

      [This message has been edited by Paul Dixon (edited August 15, 2000).]


      ------------------

      Comment

      Working...
      X