Printing on Dot-Matrix Printer, Stop and Restart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gurbinder Kaur
    New Member
    • Jul 2007
    • 3

    Printing on Dot-Matrix Printer, Stop and Restart

    Hi,

    i have made a project for printing fee receipt. Using Windows-XP, VBasic 6.0 & Ms-Access-97. i have designed a form for prinring receipts. m paper-size is 5x10. Two copies of bills in this size. one for student and other for fee clerk. while printing on dot-matrix, form get printed, but size is A4. My problem is
    * how to change size to 5x10 (exactly half of printed paper width-wise)
    * after printing on this size, stop the printer and not to eject
    * Restarting fee receipt printing for next student on paper.

    send code snippet.

    Please ans. me and thanks
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    I think you should try playing with the properties of the Printer object in VB. It has properties like PaperSize, PaperBin and so on, which are probably relevant to your situation.

    Comment

    • manoj bhatt
      New Member
      • Jul 2007
      • 3

      #3
      How u print the data through printer? using print #1 method or printer.print method?. If ur data is in english language, u will not get any problem, try print #1 method, open LPT1 (connect yr printer in LPT port) in write mode and transfer the data through print #1 method, everything will work, u will get speed and control over printer.

      Comment

      • Gurbinder Kaur
        New Member
        • Jul 2007
        • 3

        #4
        Originally posted by Gurbinder Kaur
        Hi,

        i have made a project for printing fee receipt. Using Windows-XP, VBasic 6.0 & Ms-Access-97. i have designed a form for prinring receipts. m paper-size is 5x10. Two copies of bills in this size. one for student and other for fee clerk. while printing on dot-matrix, form get printed, but size is A4. My problem is
        * how to change size to 5x10 (exactly half of printed paper width-wise)
        * after printing on this size, stop the printer and not to eject
        * Restarting fee receipt printing for next student on paper.

        send code snippet.

        Please ans. me and thanks




        Thanks Sir,

        i will apply your suggestions and inform you soon

        Comment

        • Gurbinder Kaur
          New Member
          • Jul 2007
          • 3

          #5
          Originally posted by manoj bhatt
          How u print the data through printer? using print #1 method or printer.print method?. If ur data is in english language, u will not get any problem, try print #1 method, open LPT1 (connect yr printer in LPT port) in write mode and transfer the data through print #1 method, everything will work, u will get speed and control over printer.


          Thanks Sir,

          i will do that and reply you what happened,

          ok bye.

          Comment

          • utprav123
            New Member
            • Apr 2008
            • 1

            #6
            Originally posted by Gurbinder Kaur
            Hi,

            i have made a project for printing fee receipt. Using Windows-XP, VBasic 6.0 & Ms-Access-97. i have designed a form for prinring receipts. m paper-size is 5x10. Two copies of bills in this size. one for student and other for fee clerk. while printing on dot-matrix, form get printed, but size is A4. My problem is
            * how to change size to 5x10 (exactly half of printed paper width-wise)
            * after printing on this size, stop the printer and not to eject
            * Restarting fee receipt printing for next student on paper.

            send code snippet.

            Please ans. me and thanks


            HI
            I M UTPAL


            CAN U TAL ME HOW CAN WE DONE IN VB DOS PRINTING CASH RECEIPT
            PRINTER AUTOMATICELY EJECT AND INISILYSE THE PRINTER
            CAH U TALE ME ABOUT THER CODE.

            Comment

            • andreist
              New Member
              • Aug 2009
              • 3

              #7
              3
              hi, can you show that code on this forum so we can also know about print#1 method or printer.print method
              please ... because i have same trouble

              Comment

              • andreist
                New Member
                • Aug 2009
                • 3

                #8
                How u print the data through printer? using print #1 method or printer.print method?. If ur data is in english language, u will not get any problem, try print #1 method, open LPT1 (connect yr printer in LPT port) in write mode and transfer the data through print #1 method, everything will work, u will get speed and control over printer.
                hi, can you show that code on this forum so we can also know about print#1 method or printer.print method
                please ... because i have same problem

                thanks

                Comment

                • CyberSoftHari
                  Recognized Expert Contributor
                  • Sep 2007
                  • 488

                  #9
                  Originally posted by Gurbinder Kaur
                  Hi,
                  i have made a project for printing fee receipt. Using Windows-XP, VBasic 6.0 & Ms-Access-97. i have designed ...
                  You can code like this,
                  [CODE=vb]
                  On Error GoTo ErrTrap
                  Open LPT1 For Output As #1
                  Write #1, PrintString1
                  Write #1, PrintString2
                  Close #1
                  'exit method
                  ErrTrap:
                  MsgBox Err.Description , vbCritical + vbOKOnly
                  [/CODE]

                  Pass PrintStrings between paper size.
                  Last edited by CyberSoftHari; Aug 6 '09, 06:22 AM. Reason: Pass PrintStrings ...

                  Comment

                  • andreist
                    New Member
                    • Aug 2009
                    • 3

                    #10
                    Thanks about your response ...
                    But there is more complicate situation on my form.
                    I have data in subform and mainform, for example:

                    On mainform:
                    ---------------------------------------------------------
                    Date: 08/13/2009 Name: Andrew
                    ---------------------------------------------------------
                    On subform:
                    ---------------------------------------------------------
                    Item 1
                    Item 2
                    Item 3
                    ...
                    ...
                    ---------------------------------------------------------

                    What kind of syntax that i can use for that situation? (print #1 method or printer.print method)

                    Actually I already have the report for that form but the problem is the printer can't be stop eject after print for last line on dot matrix printer then make long distance from last line to end of paper size. Can I just stop the printer eject after the last line with VBA?

                    Comment

                    Working...