Page 1 of 1
barcode
Posted: Sun Dec 09, 2012 9:10 pm
by fouednoomen
dear All
i try to use this sample in my application to display barcode.
but i got this strange result please help
Re: barcode
Posted: Sun Dec 09, 2012 11:22 pm
by tave2009
No hay problema:
Con el explorador de windows buscá el archivo "EAN13_0.TTF", doble click sobre el.
Se abre una pantalla, click en el botón "Instalar", listo. Corré tu programa y magicamente
aparece el código de barras.
Traducción Google:
No problem:
With Windows Explorer locate the file "EAN13_0.TTF", double click on the.
A screen opens, click on the "Install" ready. Run your program and magically
bar code appears.
Saludos
Walter
Re: barcode
Posted: Mon Dec 10, 2012 1:04 am
by danielmaximiliano
Hello fouednoomen
morning I prepared an example to implement GS1 EAN improved in its application.
can read a bit this thread.
would be good to their profile that aggregates current place to know a little more.
Friend Mol :
http://hmgforum.com/viewtopic.php?f=9&t=2555
Me :
http://hmgforum.com/viewtopic.php?f=15&t=2439
Me :
http://hmgforum.com/viewtopic.php?f=9&t=2449
Re: barcode
Posted: Mon Dec 10, 2012 6:18 am
by mol
Printing EAN-13 is more complicated than use only proper font.
You need do read more about it, because first 6 digits could appear in A or B variant.
Re: barcode
Posted: Mon Dec 10, 2012 10:45 am
by danielmaximiliano
mol wrote:Printing EAN-13 is more complicated than use only proper font.
You need do read more about it, because first 6 digits could appear in A or B variant.
El codigo susminstrado para comprobar los digitos es preciso mas las rutina de comprobacion de digito ya tiene como para empezar, en mi caso la impresora fiscal que utilizamos HASAR 715F imprime mediante esos codigo de impresion(Fuente de letra) y es reconocida por los distintos lectores de barra, tanto de mano como de mesa.
The most supply for checking code digits plus the routine must check digit and is to start, in my case the fiscal printer Hasar 715F use by those printing code (Font Letter) and is recognized by different readers bar, both handheld and table.

- 715.png (51.04 KiB) Viewed 6851 times
Code: Select all
aadd( aTab1CodBar, '-AAAAAA' )
aadd( aTab1CodBar, '-AABABB' )
aadd( aTab1CodBar, '-AABBAB' )
aadd( aTab1CodBar, '-AABBBA' )
aadd( aTab1CodBar, '-ABAABB' )
aadd( aTab1CodBar, '-ABBAAB' )
aadd( aTab1CodBar, '-ABBBAA' )
aadd( aTab1CodBar, '-ABABAB' )
aadd( aTab1CodBar, '-ABABBA' )
aadd( aTab1CodBar, '-ABBABA' )
Code: Select all
*---------------------------- /**********************************************************/
Procedure Check()
*----------------------------
** Primer dígito
cLitCD := LEFT( Stock.Text_1.Value , 1 )
** Dígitos del 2 al 7
For nCounter = 2 to 7
cLetraTabla := SUBST( aTab1CodBar[ VAL( LEFT( Stock.Text_1.Value , 1 ) ) + 1 ] , nCounter , 1 )
if cLetraTabla = "A"
cLitCD += chr( 65 + VAL( SUBST( Stock.Text_1.Value , nCounter , 1 ) ) )
else // "B"
cLitCD += chr( 75 + VAL( SUBST( Stock.Text_1.Value , nCounter , 1 ) ) )
endif
Next
cLitCd += "*"
** Dígitos del 8 al 13
For nCounter = 8 to 13
cLitCD += chr( 97 + VAL( SUBST( Stock.Text_1.Value , nCounter , 1 ) ) )
Next
cLitCD += "+"
Stock.cCodeFinal.value := cLitCD
*Stock.cCodeFinal.REFRESH
Return
Code: Select all
Function GTIN_CHECK(cCode)
Local nTop := iif( Len( cCode ) >= 12 , 6 , 4 )
Public nControl := 0
Public nFor := 0
Public nPair := 0
Public nOdd := 0
for nFor= 1 to nTop
nPair := nPair + val( subst( cCode,( nFor * 2 ) , 1 ) ) // suma de pares // Sum Digits Pair
nOdd := nOdd + val( subst( cCode,( nFor * 2 ) - 1, 1 ) ) // suma de impares // Sum Digits odd
next
// 7 7 9 8 1 3 8 5 5 0 9 4 0
// Pair := 9 + 8 + 3 + 5 + 0 + 4 = 29 * 3 = 87
// Odd := 7 + 9 + 1 + 8 + 5 + 9 = 49 + 49
// Control 136
If nTop == 6
nControl := nPair * 3
nControl := nControl + nOdd
nControl := Int( 10 - Mod(nControl , 10 ) ) // Mod( nControl , 10 )
Else
nControl := nOdd * 3
nControl := nControl + nPair
nControl := Int( 10 - Mod(nControl , 10 ) )
Endif
If nControl = 10
nControl = 0
Endif
Return Alltrim( Str( nControl , 1 ) )
The code contains errors "S U B S T R" because the server will not let me put this code for DOS attacks
The TTF font used is in the folder " \EAN13\Fuentes necesarias
If you need anything else just have to comment that try to help
Re: barcode
Posted: Mon Dec 10, 2012 1:32 pm
by fouednoomen
Dear All Friend
Many thanks for your prompt replay
Now it's Run
Foued
Re: barcode
Posted: Sat Dec 22, 2012 2:04 pm
by hkrasser
I have prepared another test-program for You.
Please note, that You have to Copy the Font "ean13.ttf" in the directory \windows\fonts ( in XP )
Good luck with Ean-Printing!
Re: barcode
Posted: Sat Dec 22, 2012 4:23 pm
by mol
thanks for sharing!
Re: barcode
Posted: Sat Dec 22, 2012 10:39 pm
by fouednoomen
Many Thanks My friend
It's Run very well
Regards
Fouad