Lazarus

Programming => Operating Systems => Android => Topic started by: vags15 on July 22, 2020, 03:28:28 am

Title: How can you print a barcode (code 39) in lamw
Post by: vags15 on July 22, 2020, 03:28:28 am
First of all, good evening to all the friends of the Lazarus Lamw forum.
I have small application works using ionic, quasar framework and nativescript-vue.

I had seen Lamw before but 4 years ago and had errors with the examples to compile. I just went back to give a view to Lamw and it is great nothing to envy another framework since Lazarus seems very familiar to me when it comes to working.

I am using the example that comes in AppBluetoothClientSocketDemo2, I had no problem connecting to the printer by Bluetooth and printing normally. But I can't find an example of how to generate a barcode to print from the apk application.

I have tried the esc pos printer codes but to no avail so look for other alternatives like generating it from lamw.
Title: Re: How can you print a barcode (code 39) in lamw
Post by: jmpessoa on July 22, 2020, 03:58:23 am
Quote
I can't find an example of how to generate a barcode....

Can someone  point a java example/code/library ? 

I can try to implement a LAMW wrapper component....
Title: Re: How can you print a barcode (code 39) in lamw
Post by: TRon on July 22, 2020, 04:35:21 am
Can someone  point a java example/code/library ? 
I have no experience with these myself but perhaps the following links could be of help to you ?
- https://www.androidcode.ninja/android-bluetooth-tutorial/
- https://anastaciocintra.github.io/escpos-coffee/
- https://stackoverflow.com/questions/10353392/generate-barcode-image-in-android-application
Title: Re: How can you print a barcode (code 39) in lamw
Post by: vags15 on July 22, 2020, 04:48:42 am
Quote
I can't find an example of how to generate a barcode....

Can someone  point a java example/code/library ? 

I can try to implement a LAMW wrapper component....

Sorry if I still don't use the forum tool well. Great serial if you can create a component that can print directly from lamw the barcode or Qr.
Title: Re: How can you print a barcode (code 39) in lamw
Post by: jmpessoa on July 24, 2020, 08:26:30 pm

Done!

NEW jcQRGen Component! [need gradle build system!]

NEW demo "AppQRGenDemo1" 

ref.:
https://github.com/kenglxn/QRGen

PS. I will try implement some barcode generator, too....
Title: Re: How can you print a barcode (code 39) in lamw
Post by: vags15 on July 24, 2020, 11:50:55 pm
Thank you very much Mr. jmpessoa, for implementing the QR code generation.
Without abusing your trust and your time it could include 1D barcode generation.

Here is the demo was great wow.


Title: Re: How can you print a barcode (code 39) in lamw
Post by: TRon on July 25, 2020, 01:02:52 am
Done!
Thank you very much !

Quote
PS. I will try implement some barcode generator, too....
That brings a question.

Barcodes itself can also be generated with Pascal code (in fact there is a Delphi pascal native library), so what is the preference there ?
Title: Re: How can you print a barcode (code 39) in lamw
Post by: PeterEvans on July 25, 2020, 02:20:47 am
And for those of you wondering what the bar code images say :-

Image 1 : Hello World!
Image 2 : Hello World 250x250!

Thank you #jmpessoa for your good work.
Title: Re: How can you print a barcode (code 39) in lamw
Post by: jmpessoa on July 25, 2020, 02:37:48 am
Quote
Barcodes itself can also be generated with Pascal code (in fact there is a Delphi pascal native library), so what is the preference there ?

Well,  if it dont have any LCL/VCL dependency  you can try it just now!
[pure Pascal/FCL libraries work in LAMW!]
Title: Re: How can you print a barcode (code 39) in lamw
Post by: jmpessoa on July 26, 2020, 06:15:44 am

Done!!

NEW jBarcodeGen Component!

NEW demo "AppBarcodeDemo1"

[code_128, EAN_13, EAN_8, ...]

Thanks!
TinyPortal © 2005-2018