Recent

Author Topic: How can you print a barcode (code 39) in lamw  (Read 3246 times)

vags15

  • New member
  • *
  • Posts: 7
How can you print a barcode (code 39) in lamw
« 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.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How can you print a barcode (code 39) in lamw
« Reply #1 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....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

TRon

  • Hero Member
  • *****
  • Posts: 2503
Re: How can you print a barcode (code 39) in lamw
« Reply #2 on: July 22, 2020, 04:35:21 am »
« Last Edit: July 22, 2020, 04:46:26 am by TRon »

vags15

  • New member
  • *
  • Posts: 7
Re: How can you print a barcode (code 39) in lamw
« Reply #3 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.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How can you print a barcode (code 39) in lamw
« Reply #4 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....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

vags15

  • New member
  • *
  • Posts: 7
Re: How can you print a barcode (code 39) in lamw
« Reply #5 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.



TRon

  • Hero Member
  • *****
  • Posts: 2503
Re: How can you print a barcode (code 39) in lamw
« Reply #6 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 ?

PeterEvans

  • New Member
  • *
  • Posts: 24
Re: How can you print a barcode (code 39) in lamw
« Reply #7 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.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How can you print a barcode (code 39) in lamw
« Reply #8 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!]
« Last Edit: July 25, 2020, 02:43:10 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How can you print a barcode (code 39) in lamw
« Reply #9 on: July 26, 2020, 06:15:44 am »

Done!!

NEW jBarcodeGen Component!

NEW demo "AppBarcodeDemo1"

[code_128, EAN_13, EAN_8, ...]

Thanks!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: How can you print a barcode (code 39) in lamw
« Reply #10 on: April 26, 2021, 03:58:13 pm »
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....

Try wrap this mr jm, it would be very usefull for printing image on bluetooth printer.
https://github.com/ilhamsuaib/Android-Print-Bluetooth/tree/master/app/libs

 

TinyPortal © 2005-2018