Announcement

Collapse
No announcement yet.

printing throw small printer

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

    printing throw small printer

    hi

    Im working at PB35 , and im trying to print at small printer (STAR SP2000) from dos

    when im writing this line from dos the printer is working

    ( c:\ copy filename com1)

    it is printing the file put when im trying to print throw PB35 using LPRINT COMMAND

    nothing happened
    it is like it don't know the port to send at it

    please could tell me how to defined the com1 port from PB35

    THANKS

    nedal qunibi
    programmer




    ------------------
    Nidal
    Nidal

    #2
    Hi Nidal,

    open "com1:" for output as #1: width "com1:",255:close #1
    open "com1:" for output as #1: width "com1:",255
    'width is nessecery if You want to print over 80 signs/line
    and no inserted carriage returns( Ean-code or grafik data).
    .
    print #1, "Hallo";
    .
    print #1, chr$(12) 'next side eg.
    .
    close #1
    .
    See PB Book "Reference Guide " page 187f, 288f
    .
    Regards

    Matthias Kuhn



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

    Comment


      #3
      HI Matthias

      I TRYED THIS SCRIPT
      THE COM1 IS WORKING
      BUT THE OUTPUT IS NOT CORRECT

      MY CODE IS

      OPEN "COM1:" FOR OUTPUT AS #1
      PRINT #1, "HELLO";
      CLOSE #1


      AND THE OUT PUT WAS LIKE THIS

      ?????? ?????????????

      DO YOU HAVE ANY IDEA ABOUT THIS

      THANKS


      ------------------
      Nidal
      Nidal

      Comment


        #4
        Your COM1: parameters has to match what the printer is expecting.
        Look in the printer book and find the baud rate, parity and number
        of data bits. If the book says, for example, Buad rate=1200, no
        parity and 8 data bits, use the syntax:

        Open "com1:1200,n,8,1" as #1

        then

        m$ = "Hello"
        print #1,m$

        If you don't have the book, you will have to play around with these
        parameters until it (should) works.

        But this should work.
        Hope this helps
        Cheers


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




        [This message has been edited by Mel Bishop (edited June 02, 2002).]
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.

        Comment


          #5
          Nidal, please restrict the number of places that you ask the exact same question. Thank you.

          My advice for Nidal is to review the SERPRINT.FAQ file supplied with PB/DOS...


          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎