Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Using Epson posprinter tm-u200b

I am wanto print a ticket in the pos printer.
but only it prints 20 lines, no print more lines.
the print.enddoc always it's makeit.
somebody to help me pls.

Code wrote to print:
sub PrintInvoice()
   On Error Resume Next
   Dim totGrav As Currency
   Dim totExen As Currency
   Printer.ScaleMode = 4   'Character
   'Printer.FontName = "Courier New"
   Printer.FontSize = 10
   Printer.FontBold = True
   '                       1         2         3         4
'                 1234567890123456789012345678901234567890
   Printer.Print PadC("jjjjjjjjjjjjjj", 40)
   Printer.FontBold = False
   Printer.Print PadC("nnnnnnnnnnnnnnn", 40)
   Printer.Print PadC("IVA D.L. 296 : GASOLINERA Y CAFETERIA", 40)
   Printer.Print PadC("NCR(IVA):999 NIT:00000000000000", 40)
   Printer.Print "ALAM. MANUEL E. ARAUJO / CALLE NVA 1 Y 2"
   Printer.Print "FECHA:" & FormatDateTime(Date, vbShortDate) & "  HORA:" & FormatDateTime(Time, vbLongTime)
   Printer.Print "CAJA No.1       TIKET No.:"; Trim(txtCampo(1))
   Printer.Print "CAJERO(A):" & wUser
   Printer.Print Space(1)
   
   Printer.Print "========================================"
   Printer.Print "CAN  DETALLE PRODUCTO  *   P/U   SUBTOT "
   Printer.Print "========================================"
   With Data2.Recordset
      .MoveFirst
      Do While Not .EOF
         Printer.Print Pad_Str(!cantidad, " ", 3, True) + _
                      Space(1) + Pad_Str(Left(!descripcion, 17), " ", 17, False) + _
                      Space(1) + IIf(!exento, "E", "G") + _
                      Space(1) + Pad_Str(FormatNumber(!precio, 2), " ", 8, False) + _
                      Space(1) + Pad_Str(FormatNumber(!totventa + !valiva, 2), " ", 9, False)
         If !exento Then
            totExen = totExen + !totventa
         Else
            totGrav = totGrav + !totventa + !valiva
         End If
         .MoveNext
      Loop
   End With
   Printer.Print "========================================"
   Printer.Print Pad_Str("TOTAL GRAVADOS ", " ", 31, False) + Pad_Str(FormatNumber(totGrav, 2), " ", 9, True)
   Printer.Print Pad_Str(" TOTAL EXENTOS ", " ", 31, False) + Pad_Str(FormatNumber(totExen, 2), " ", 9, True)
   Printer.Print Pad_Str("    GRAN TOTAL ", " ", 31, False) + Pad_Str(FormatNumber(totExen + totGrav, 2), " ", 9, True)
   Printer.Print Pad_Str("RECIBIDO $     ", " ", 31, False) + Pad_Str(FormatNumber(txtTotal(3), 2), " ", 9, True)
   Printer.Print Pad_Str("      CAMBIO $ ", " ", 31, False) + Pad_Str(FormatNumber(txtTotal(4), 2), " ", 9, True)
   Printer.Print Space(1)
   Printer.Print " * PRODUCTOS  G) GRAVADOS  E) EXENTOS"
   Printer.Print PadC("GRACIAS POR SU COMPRA, VUELVA PRONTO", 40)
   'Printer.CurrentX
   Printer.EndDoc
End sub

Notes:
padc and pad_str are user functions.
0
jmgs082598
Asked:
jmgs082598
1 Solution
 
mcoopCommented:
I suspect that the page length is set to a default somewhere else...  (perhaps default as installed)

You need to put your application aside for a while, and do some detailed experimentation with the printer alone.

Have a look at the page length functions (and the associated Knowledge Base items) - to determine how your printer behaves at page boundaries.  There may also be an escape sequence you need to send to the printer to enable/disable page jumps.

Or - you may need to set a very long, or a very short page length - in order to create what you ae looking for.

I doubt that these printers were designed to be Windows printers as such (they work with Windows as a side-effect of their design, so you may find that there a few variables that you would not normally have to consider when printing to these units...  including some things like the paper cutter and form feed functions.
0
 
DanRollinsCommented:
Hi jmgs,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mcoop's comment(s) as an answer.

jmgs, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now