Java Question Need help creating library

Johan Schoeman

Expert
Licensed User
Longtime User
I have a 4.2. can 6.0 not be compatible with an earlier ver?
I have no idea - that only the manufacturer can tell us. Have asked them for sample code for both 4.2 and 6.0
 

Thupheo

Member
Licensed User
Hi Johan,
I have tested both the text and bitmap printing and it works HOWEVER the prints are trimmed at the bottom thereby cutting out important info, e.g a number on the bottom of the Barcode image is trimmed out. I have tried adjusting text with the RichString without success. It would be great if we can have the ability to adjust the FONT-SIZE and ALIGNMENT as they have done in the examples attached.
Once again, thanks for the great work.
 

Attachments

  • PrinterActivity.java
    19 KB · Views: 401
  • PrinterTicketActivity.java
    21.2 KB · Views: 394

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan,
I have tested both the text and bitmap printing and it works HOWEVER the prints are trimmed at the bottom thereby cutting out important info, e.g a number on the bottom of the Barcode image is trimmed out. I have tried adjusting text with the RichString without success. It would be great if we can have the ability to adjust the FONT-SIZE and ALIGNMENT as they have done in the examples attached.
Once again, thanks for the great work.
Thanks for the donation @Thupheo. Attached are new library files and below what the library looks like at present. Sure you will figure out the commands. Please let me know if it is working.

The library as it is at present:

PDA3505
Version:
1.02
  • NewPrint
    Methods:
    • ClosePrinter
    • Initialize (paramString As String)
    • alignLeft
    • alignMiddle
    • alignRight
    • boldOff
    • boldOn
    • font16x16
    • font24x24
    • fontSizeDouble
    • fontSizeDoubleHigh
    • fontSizeDoubleWidth
    • fontSizeNormal
    • horizontalTab
    • newLine
    • printCRLF
    • underlineOff
    • underlineOn
    Permissions:
    • android.hardware.camera
    • android.hardware.camera.autofocus
    • android.permission.CAMERA
    • android.permission.FLASHLIGHT
    • android.permission.INJECT_EVENT
    • android.permission.RECEIVE_BOOT_COMPLETED
    • android.permission.VIBRATE
    • android.permission.WRITE_EXTERNAL_STORAGE
    Properties:
    • PrintImage As Bitmap [write only]
    • PrintText As String [write only]
    • PrintUnicode As String [write only]
 

Attachments

  • PDA3505.xml
    4.4 KB · Views: 379
  • PDA3505.jar
    27.4 KB · Views: 302

Johan Schoeman

Expert
Licensed User
Longtime User
Dear Johan
Any Help on my scanning wrapping function ?
I have ordered a PDA3505 unit - it is on its way. Will try and sort it out once I have received it.
 

ctd

Member
Licensed User
As far as what I understand the "laser scanner" only scans 1D barcodes. Seems like you will have to use the camera to scan 2D barcodes. Can you confirm that this is indeed the case?
This is not the case. The "laser scanner" is for 1D and 2D at the same time.
 

Johan Schoeman

Expert
Licensed User
Longtime User
This is not the case. The "laser scanner" is for 1D and 2D at the same time.
OK - will look into it once I have received my unit. Working "blind" on this without a unit is a bit difficult.
 

Johan Schoeman

Expert
Licensed User
Longtime User

ctd

Member
Licensed User
I have received my unit. They have sent me a PDA3506 with Marshmallow. And the SDK is completely different to that of the PDA3505....And I mean - completely different. No compatibility with the PDA3505 whatsoever. I have asked them about it and it is indeed the case....
Need your advise:
> To give up the PDA3505 and find a new one. in this case i have just need a basic PDA that can only handle scanning.
> upgrade my PDA3505 android version to Marshmallow.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Need your advise:
> To give up the PDA3505 and find a new one. in this case i have just need a basic PDA that can only handle scanning.
> upgrade my PDA3505 android version to Marshmallow.
I don't think that option 2 is viable. I think there is also a hardware change between 3505 and 3506. But you can perhaps take it up with them and see what they say about an upgrade to Marshmellow and if the 3506 SDK will then work on the upgraded 3505.
 

Ferpo

Member
Licensed User
Longtime User
I try to use in PDA3502 and tha aplication stop without print.
Can you send me the proyect to try compilate a new wrapped library to correct SDK to PDA3502?
fernando at opentrace.com.ar
 

DonManfred

Expert
Licensed User
Longtime User
mr Johan Schoeman, can you change the printer port to
you should create a NEW THREAD in the quewstionsforum about your issie.

Asking in THIS thread is the WRONG way!

You should NEVER post to existing threads to post a question
 

Johan Schoeman

Expert
Licensed User
Longtime User
mr Johan Schoeman, can you change the printer port to
B4X:
handler.setParameters("/dev/ttyS2", 115200);

my pda has this printer port.

Victor
Try with the attached lib files and B4A project. I have allowed for the port and baud rate to be set from within the B4A code

B4X:
    prt.Initialize("")
    
    prt.Device = "/dev/ttyMT1"
    prt.BaudRate = 115200
 

Attachments

  • b4aPDA3505Printer.zip
    12.5 KB · Views: 220
  • LibraryFiles.zip
    203.3 KB · Views: 247
Top