Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Barcode generator
Started by Aarbron Sep 06 2019 11:18 PM

- - - - -
3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Aarbron

[GLOBAL: userInfoPane.html]
Aarbron
  • Contributor

  • 100 posts
  • Corona SDK

Hello!

 

Using a phone I need to scan a barcode and generate the barcode on phone's screen.

Scanning is easy using the QR Scanner plugin.

 

Generating the barcode on phone's screen is a trouble!

There is the Barcode Generator plugin but supports only 2 of 5 and 3 of 9.

I need Code 128!

Any ideas?



[TOPIC: post.html]
#2

carloscosta

[GLOBAL: userInfoPane.html]
carloscosta
  • Contributor

  • 654 posts
  • Corona SDK

did you tried to download the font and just display.Text the code you want with that font?

 

https://www.dafont.com/code-128.font



[TOPIC: post.html]
#3

Aarbron

[GLOBAL: userInfoPane.html]
Aarbron
  • Contributor

  • 100 posts
  • Corona SDK

I tried it but no luck.

 

Testing the random 555555 in any online barcode generator the output is not the same.

Also the barcode is made from 19 different bars but I get only 18 when using fonts.

I understand the reason, just saying it :).



[TOPIC: post.html]
#4

carloscosta

[GLOBAL: userInfoPane.html]
carloscosta
  • Contributor

  • 654 posts
  • Corona SDK

I know it work, because i already done it with EAN 13. it's not direct as you think, you need formulas because usually there is a checksum character. In code 128 you have also a start and end char.

 

https://en.m.wikipedia.org/wiki/Code_128

 

https://www.barcodefaq.com/1d/code-128/




[topic_controls]
[/topic_controls]