EAN-8 Barcode generator
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: EAN-8 Barcode generator
Or we should use HMG_LEN() function instead of len()
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: EAN-8 Barcode generator
Thank you for sharing Rathi,
very nice work !!
Hi Daniel, '96385074' it works fine for me.
Nikos
very nice work !!
Hi Daniel, '96385074' it works fine for me.
Nikos
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: EAN-8 Barcode generator
For me too; '9638507" and '9638507 " too.quartz565 wrote: '96385074' it works fine for me.
Mol, already ALLTRIM'med.
Code: Select all
cCode := alltrim( cCode ) // line 124
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: EAN-8 Barcode generator
This is the second version.
1. Added an option to show/hide the digits in the barcode.
2. Separated ean8 encoding code into a separate prg so that it can be added to any project and called with a function. Or we can create a library. (If Marek makes his code into a library for EAN-13 like this it will be great.)
3. Added Esgici's suggestion.
4. Made the default line width to 2 and line height to 110 for making the barcode visible and sizable.
1. Added an option to show/hide the digits in the barcode.
2. Separated ean8 encoding code into a separate prg so that it can be added to any project and called with a function. Or we can create a library. (If Marek makes his code into a library for EAN-13 like this it will be great.)
3. Added Esgici's suggestion.
4. Made the default line width to 2 and line height to 110 for making the barcode visible and sizable.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: EAN-8 Barcode generator
Superb !Rathinagiri wrote:This is the second version.
1. Added an option to show/hide the digits in the barcode.
2. Separated ean8 encoding code into a separate prg so that it can be added to any project and called with a function. Or we can create a library. (If Marek makes his code into a library for EAN-13 like this it will be great.)
3. Added Esgici's suggestion.
4. Made the default line width to 2 and line height to 110 for making the barcode visible and sizable.
Thanks
Viva HMG
Viva INTERNATIONAL HMG
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: EAN-8 Barcode generator
Hi RathiRathinagiri wrote:This is the second version...]
After "Invalid Code" and "Invalid check sum", createbarcode() function open last produced barcode image (barcode.png).
To avoid this, my humble suggestion is :
When "Invalid Code" or "Invalid check sum" situations occurs, ean8_barcode() functions returns .f., ( line 56 and 74 of ean8.prg )
else return .t. (last line (115) )
and createbarcode() function will be like this :
Code: Select all
function createbarcode
local cImage := 'barcode.png'
if ean8_barcode( barcode.code.value, cImage, barcode.linewidth.value, barcode.lineheight.value, barcode.showdigits.value )
if file( cImage )
open file cImage
endif
endif
return nil
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: EAN-8 Barcode generator
Yes. That is right. Thank you Esgici.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: EAN-8 Barcode generator
OK, I'll do it!Rathinagiri wrote:This is the second version.
1. Added an option to show/hide the digits in the barcode.
2. Separated ean8 encoding code into a separate prg so that it can be added to any project and called with a function. Or we can create a library. (If Marek makes his code into a library for EAN-13 like this it will be great.)
3. Added Esgici's suggestion.
4. Made the default line width to 2 and line height to 110 for making the barcode visible and sizable.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: EAN-8 Barcode generator
Thanks Marek.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.