Announcement

Collapse
No announcement yet.

Printing Problem

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

  • Printing Problem

    I have just finished comverting a large commercial QuickBasic 4.5
    application to PowerBasic 3.5 which all seems to run fine. However
    I went to a client's office yesterday to do some live testing and
    have found a serious problem with printing from PB35 which appears to
    be much slower than QB4.5.

    Below is test code run in both QB and PB.

    The LPRINT test takes about 30 secs to hit the printer in both
    versions which isn't a problem as I don't use LPRINT since W2000.

    But the "OUTPUT" version is also taking 30 secs to hit the printer
    in PB against 4 secs in QB.

    I am running the test below on to a USB printer at home which may
    well influence the results but when on site at a client's yesterday
    "OUTPUT"ing from PB on to a dot matrix attached to LPT1: a small
    print job took 27 secs to hit the printer.

    This is a show stopper! Any help would be greatly appreciated.

    I have spent the best part of a year converting a large suite of
    programmes to PB and seriously hope there is a solution to this.

    Keenly waiting
    Roy

    $compile exe
    $cpu 80386
    $string 32
    $dim array
    defint a - b, d - z
    $dynamic
    $event off
    $optimize speed
    $stack 10240
    option binary base 1

    eop$ = chr$(12)
    st$ = "Starting - "
    dun$ = "Finished - "
    pls$ = "Press any key"

    pr$ = "lprint - no width"
    port$ = "LPT1"
    cls

    print st$; pr$
    lprint pr$;
    lprint eop$;
    print dun$; pr$
    print
    print pls$

    do
    z$ = inkey$
    loop while z$ = ""

    pr$ = "output - no width"
    port$ = "LPT1:"
    print st$; pr$
    open port$ for output as #8
    print #8, pr$;
    print #8, eop$;
    close #8
    print dun$; pr$
    print
    print pls$

    do
    z$ = inkey$
    loop while z$ = ""

    width lprint 255
    pr$ = "lprint - width 100"
    port$ = "LPT1"

    print st$; pr$
    lprint pr$;
    lprint eop$;
    print dun$; pr$
    print
    print pls$

    do
    z$ = inkey$
    loop while z$ = ""

    pr$ = "print - width 100"
    port$ = "LPT1:"

    print st$; pr$
    open port$ for output as #8
    print #8, pr$;
    print #8, eop$;
    close #8
    print dun$; pr$
    print
    print pls$

    do
    z$ = inkey$
    loop while z$ = ""

    system

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

  • #2
    You did not which platform you are working on so this may or
    may not work for you.

    There was a problem that first raised in Windows 98 on printing
    from nearly all DOS applications that were not writtin in using
    a Microsoft Compiler, Microsoft denied changing anything but did
    admit the problem existed.

    You need to edit the SYSTEM.INI file it still exists in XP but I
    do not know if Microsoft use it any more anyway add the following
    the section Network may allready exist in which case just add the
    command

    [Network]
    PrintBufTime=10

    [IFSMGR]
    PrintBufTime=10

    You can adjust the value 10 up or down, you will to restart your
    PC before you will know if it works.

    Regards

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

    Comment


    • #3
      Fraser

      Thanks for the tip seems to help. Having spent a large part of Saturday
      morning reviewing the archives and testing I found that opening LPT1 (no colon)
      did the trick. My testing showed that QB on "LPT1:" and PB on "LPT1"
      produced the same results.

      Thanks
      Roy

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

      Comment

      Working...
      X