Third party jar - 50$

Discussion in 'Job Offers' started by jroriz, May 15, 2019.

  1. jroriz

    jroriz Active Member Licensed User

    Attached Files:

    Marcus Araujo and DonManfred like this.
  2. Star-Dust

    Star-Dust Expert Licensed User

    Some Zonerich models are ESC / POS compatible and you could use a library for thermal printers already existing in the USB and Bluetooth forum.

    Make sure they work with ESC / POS or better if you have the printer available, try the libraries available on the forum
     
    Peter Simpson and f0raster0 like this.
  3. DonManfred

    DonManfred Expert Licensed User

    Check the documentation on how (in which order) you need to call commands. As i do not have such a printer i can not provide an Example.
    But should be easy to create.

    Note that you need special permissions for this Printer (see Documentation).

    ZQPrinter

    Author: DonManfred
    Version: 0.01
    • ZQPrinterSDK
      • Functions:
        • bar_Barcode (nX As Int, nY As Int, strCodeType As String, nHeight As Int, nReadable As Int, nRotation As Int, nNarrow As Int, nWide As Int, strCode As String) As Int
        • bar_Bitmap (nX As Int, nY As Int, nMode As Int, strFileName As String) As Int
        • bar_Bitmap2 (nX As Int, nY As Int, nMode As Int, bitmap As Bitmap) As Int
        • bar_DownloadBAS (strFileName As String, strContent As String) As Int
        • bar_DownloadFile (strFileName As String, strLocalFileName As String) As Int
        • bar_DrawBar (nX As Int, nY As Int, nWidth As Int, nHeight As Int) As Int
        • bar_DrawBox (nXStart As Int, nYStart As Int, nXEnd As Int, nYEnd As Int, nThickness As Int) As Int
        • bar_KillFile (strFileName As String) As Int
        • bar_Print (nSets As Int, nCopies As Int) As Int
        • bar_PrintCounter (nX As Int, nY As Int, strFontName As String, nRotation As Int, nXMulti As Int, nYMulti As Int, nCounter As Int)
        • bar_PutPCX (nX As Int, nY As Int, strFileName As String) As Int
        • bar_QRCode (nX As Int, nY As Int, nWidth As Int, nHeight As Int, strCode As String) As Int
        • bar_QRCode2 (nX As Int, nY As Int, nWidth As Int, nHeight As Int, strCode As String, markBMP As Bitmap) As Int
        • bar_RunFile (strFileName As String) As Int
        • bar_SetBline (dHeight As Double, dExtra As Double, nUnit As Int) As Int
        • bar_SetCharacterSet (strCode As String) As Int
        • bar_SetCounter (n As Int, nStep As Int, strExp As String) As Int
        • bar_SetDensity (nDensity As Int) As Int
        • bar_SetDirection (nDirection As Int, nMirror As Int) As Int
        • bar_SetGap (dDst As Double, dOffset As Double, nUnit As Int) As Int
        • bar_SetOffset (dOffset As Double, nUnit As Int) As Int
        • bar_SetPeel (bFlag As Boolean) As Int
        • bar_SetReverse (nX As Int, nY As Int, nWidth As Int, nHeight As Int) As Int
        • bar_SetShift (nShift As Int) As Int
        • bar_SetSize (dWidth As Double, dHeight As Double, nUnit As Int) As Int
        • bar_SetSpeed (nSpeed As Int) As Int
        • bar_Text (nX As Int, nY As Int, strFontName As String, nRotation As Int, nXMulti As Int, nYMulti As Int, strContent As String) As Int
        • EnableBLE (enable As Boolean)
        • finalize
        • Initialize (EventName As String)
        • lbl_AddLabelCommand (strCmd As String)
        • lbl_DrawInverseLine (x0 As Int, y0 As Int, x1 As Int, y1 As Int)
        • lbl_DrawLine (lineWidth As Int, x0 As Int, y0 As Int, x1 As Int, y1 As Int)
        • lbl_DrawText (x As Int, y As Int, text As String, fontName As String, fontsize As Int, rotate As Int, bold As Int, underline As Int, reverse As Int)
        • lbl_DrawWatermark (x As Int, y As Int, text As String, fontName As String, fontsize As Int, rotate As Int, pattern As Int, gray As Int)
        • lbl_PageClear
        • lbl_PagePrint (rotate As Int) As Int
        • lbl_PageSetup (h As Int, w As Int)
        • lbl_PrintBitmap (startx As Int, starty As Int, bmp As Bitmap)
        • lbl_PrinterStatus As Int
        • lbl_PrinterStop As Int
        • Prn_BeginTransaction As Int
        • Prn_Connect (strAddr As String) As Int
        • Prn_CutPaper As Int
        • Prn_CutPaper2 (nCutMode As Int) As Int
        • Prn_Disconnect As Int
        • Prn_EndTransaction As Int
        • Prn_GetMsrTrack (Track As Int, Timeout As Int) As Byte()
        • Prn_GetPortList (nPortType As Int) As String()
        • Prn_LineFeed (nLine As Int) As Int
        • Prn_MarkFeed As Int
        • Prn_OpenCashbox As Int
        • Prn_OpenCashbox2 (iWitch As Int) As Int
        • Prn_PowerStatus As Int
        • Prn_PrintBarcode (strBarcode As String, Symbology As Int, Height As Int, Width As Int, TextPosition As Int) As Int
        • Prn_PrintBitmap (image As Bitmap, Type As Int) As Int
        • Prn_PrintBitmap1B2A (arg0 As Bitmap, arg1 As Int) As Int
        • Prn_PrintBMP (strFileName As String, Type As Int) As Int
        • Prn_PrinterInit As Int
        • Prn_PrintEscText (strPrint As String) As Int
        • Prn_PrintQRCode (nMode As Int, strCode As String) As Int
        • Prn_PrintString (strPrint As String) As Int
        • Prn_PrintText (Data As String, Alignment As Int, Attribute As Int, TextSize As Int) As Int
        • Prn_ReadData (bytes As Byte(), length As Int, timeout As Int) As Int
        • Prn_SendData (arg0 As Byte()) As Int
        • Prn_SendData2 (arg0 As Byte(), length As Int) As Int
        • Prn_SetAlignment (nAlignment As Int) As Int
        • Prn_SetFontSize (nSize As Int) As Int
        • Prn_SetFontStyle (nStyle As Int) As Int
        • Prn_SetInterCharacterSet (Value As Int) As Int
        • Prn_SetLineSpacing (nSpace As Int) As Int
        • Prn_Status As Int
        • SDK_GetVersion As String
        • SDK_SendData (arg0 As Byte()) As Int
        • SetCharacterSet (strCode As String) As Int
        • SetPortParam (arg0 As Int, arg1 As String)

    Please create a new Thread in the questionsforum for any Issue you have.
     

    Attached Files:

  4. jroriz

    jroriz Active Member Licensed User

    Thanks.
    Testing...
     
  5. DonManfred

    DonManfred Expert Licensed User

    results?
     
    alwaysbusy likes this.
  6. jroriz

    jroriz Active Member Licensed User

    Hi.
    My partner is testing the solution.
    He said he was able to instantiate the object, and the functions appeared correctly.
    But he has difficulties connecting the printer.
    I believe there is nothing else you can do.
    Thank you for your attention.
    How can we pay you? Via "donate"?
     
    somed3v3loper likes this.
  7. f0raster0

    f0raster0 Active Member Licensed User

    the easy way is par the printer with the Smartphone directly before.

    -->go Setting.

    then when starting the App you can ask to connect your App with the printer bluetooth.
    (like the app b4a that I sent to you to test months ago)
     
  8. DonManfred

    DonManfred Expert Licensed User

    Start with Bluetoothadmin tutorial (permissions and to find the mac.)
    yes
     
    Peter Simpson and f0raster0 like this.
  9. saaevr

    saaevr New Member Licensed User

    Olá
    Sou o parceiro do JRoriz, obrigado pela ajuda, mas estou tendo um problema, quando executo uma linha referenciando uma biblioteca, ele esta errado:

    Logger conectado a: samsung SM-J600GT
    --------- início do principal
    *** Serviço (inicial) Cria ***
    ** Serviço (starter) Iniciar **
    ** Atividade (principal) Criar, isFirst = true **
    ** ** Panorama da Atividade (principal)
    Erro ocorrido na linha: 355 (Principal)
    java.lang.NullPointerException: tenta ler do campo 'android.content.Context anywheresoftware.b4a.BA.context' em uma referência de objeto nulo
    em.donmanfred.ZQPrinterSDKwrapper.Prn_Connect (ZQPrinterSDKwrapper.java:78)
    em java.lang.reflect.Method.invoke (método nativo)
    em anywheresoftware.b4a.shell.Shell.runVoidMethod (Shell.java:755)
    em anywheresoftware.b4a.shell.Shell.raiseEventImpl (Shell.java:345)
    em anywheresoftware.b4a.shell.Shell.raiseEvent (Shell.java:249)
    em java.lang.reflect.Method.invoke (método nativo)
    em anywheresoftware.b4a.ShellBA.raiseEvent2 (ShellBA.java:139)
    em anywheresoftware.b4a.BA.raiseEvent2 (BA.java:170)
    em anywheresoftware.b4a.BA.raiseEvent (BA.java:166)
    em anywheresoftware.b4a.objects.ViewWrapper $ 1.onClick (ViewWrapper.java:80)
    em android.view.View.performClick (View.java:7339)
    em android.widget.TextView.performClick (TextView.java:14226)
    em android.view.View.performClickInternal (View.java:7305)
    em android.view.View.access $ 3200 (View.java:846)
    em android.view.View $ PerformClick.run (View.java:27788)


    Syntax for connecting to the mac:
    z.Prn_Connect ("88: 4A: EA: 94: 7E: 4B")
    Syntax used for name and speed connection:
    z.Prn_Connect ("AB-342M: 9600")
    Both options return the same error



    Can you help me?
    I need to print to this printer model urgently.
     
    Last edited: May 19, 2019
  10. DonManfred

    DonManfred Expert Licensed User

    You should never post to existing threads

    You can open a new thread if you have a Joboffer.

    For any questions you should create a new thread in the questionsforum!

    Start with removing the spaces from the Mac
    Code:
    z.Prn_Connect ("88:4A:EA:94:7E:4B")
    ' or
    z.Prn_Connect ("884AEA947E4B")
    Not really my Problem. ;-)
     
    Last edited: May 19, 2019
    Peter Simpson likes this.
  11. saaevr

    saaevr New Member Licensed User

    Hello
    Sorry for the message in Portuguese, was the translator of my browser.
    I'm JRoriz's partner, thanks for the help, but I'm having a problem when I run a line referencing the library.
    I've tried the MAC with no space and the error continues.

    I did not open another topic because I'm going to make the payment.

    Is the problem in the library?
     
  12. OliverA

    OliverA Expert Licensed User

    Did you do this first? Are you using this in an Activity or a Service?
     
  13. DonManfred

    DonManfred Expert Licensed User

    From the documentation (you really should read it)

    [​IMG]

    Try [ip of the device]:9100

    for ex: 192.168.1.10:9100

    For any new problem/issue: Please create a new thread in the Questionsforum.
     
    Last edited: May 20, 2019
    Peter Simpson likes this.
  14. DonManfred

    DonManfred Expert Licensed User

    Any news? Does it work now??
     
    f0raster0 likes this.
  15. DonManfred

    DonManfred Expert Licensed User

    Did you and/or @saaevr get it working?
     
    Peter Simpson likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice