HBzebra PDF417 bad (error) coding?

HBzebra PDF417 bad (error) coding?

Postby bosibila » Sun Mar 13, 2016 6:38 pm

Hello to all members,
I try to implement "hb_zebra_draw" function to create PDF417 barcode. Like I always do I search forum themes and found many useful topics, but when I try those examples in my PC output results are good only for strings in examples. When I put my string as parameter results are:
- Symbol DS9208 2d barcode reader read about 80% of text (cca 160 chars) and on results end put some random numbers
- Cell phone Blink PDF417 barcode reader software does not recognize barcode symbol (read without error only when I put 80% of my text in string)
I put various nFlags in parameter without result.
Here is simplest example provided by Daniel:
Code: Select all  Expand view
#include "fivewin.ch"

function main()

   local oWnd

   define window oWnd

   activate window oWnd;
            on paint( BarCode( hDC ) )

return nil


*
*
*
function BarCode( hDC )

   local hZebra,crlf:=chr(13)+chr(10)
   local cCode := "testing from fivewin"
   local hBrush := CreateSolidBrush( 0 )

   cCode:=""
   cCode+=("HRVHUB30")                         +chr(13)
   cCode+=("HRK")                              +chr(13)
   cCode+=("000000000021080")                  +chr(13)
   cCode+=("JOHN TRAVOLTA")                    +chr(13)
   cCode+=("SET K.F.REPERA")                   +chr(13)
   cCode+=("91000 OLD TOWN")                   +chr(13)
   cCode+=("PIPING INC.")                      +chr(13)
   cCode+=("MAIN STREET 3")                    +chr(13)
   cCode+=("91000 OLD TOWN")                   +chr(13)
   cCode+=("KR5624020061500033402")            +chr(13)    // good recognition ends with this line ...
   cCode+=("KR05")                             +chr(13)
   cCode+=("7291478581062")                    +chr(13)
   cCode+=("WTER")                             +chr(13)
   cCode+=("OVDNAOULSUGAAVLJE2016")            +chr(13)

   hZebra := hb_zebra_create_pdf417( cCode, NIL )      //nFlags:=HB_ZEBRA_FLAG_PDF417_LEVEL5     //234567

   hb_zebra_draw( hZebra, {| x, y, w, h | ( FillRect( hDC, { y, x, y +  h, x + w }, hBrush )) }, 5, 5, 1,4 )

   deleteobject( hBrush )
   hb_zebra_destroy( hZebra )

return nil


Example put barcode on screen and when I scan with scanner output this result to keyboard buffer (Notepad):

    HRVHUB30
    HRK
    000000000021080
    JOHN TRAVOLTA
    SET K.F.REPERA
    91000 OLD TOWN
    PIPING INC.
    MAIN STREET 3
    91000 OLD TOWN
    KR56240200615000334096176811052410142904390853205523596859123740615750659128006351774866760528021091

Please help, if some of you have tips for this situation or have some commercial idea ...

Boris
Last edited by bosibila on Mon Mar 14, 2016 7:20 pm, edited 1 time in total.
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Re: HBzebra PDF417 bad coding?

Postby Antonio Linares » Mon Mar 14, 2016 10:14 am

Please look for PDF417 in these forums

There are several posts about it
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HBzebra PDF417 bad coding?

Postby bosibila » Mon Mar 14, 2016 10:30 am

Hello Antonio,
sorry for waste your time, but please give me some link, I am searching forum for many days.

Mail: boris.sibila@gmail.com
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Re: HBzebra PDF417 bad coding?

Postby Antonio Linares » Mon Mar 14, 2016 3:10 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HBzebra PDF417 bad (error) coding?

Postby bosibila » Fri Mar 18, 2016 6:38 pm

I search forum to locate this HBzebra issue but without success. I am FWH user from 2008. but this is to much for my knowledge. Does someone have experience with commercial software or have time to implement PDF417 barcode in FWH program (or sell own implementation of zebra.lib). Program must create PDF417 barcode with this string: "HRVHUB30HRK000000000021080JOHN TRAVOLTASET K.F.REPERA91000 OLD TOWNPIPING INC.MAIN STREET 391000 OLD TOWNKR5624020061500033402KR057291478581062WTEROVDNAOULSUGAAVLJE2016"

Thanks,
boris.sibila@gmail.com
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Re: HBzebra PDF417 bad (error) coding?

Postby bpd2000 » Sat Mar 19, 2016 4:11 am

Check attachment is ok is was generated online from http://barcode.tec-it.com/en/PDF417
Generation of same content with HBZebra is not successful, I think there is some bug in the lib
Image
Regards, Greetings

Try FWH. You will enjoy it's simplicity and power.!
User avatar
bpd2000
 
Posts: 153
Joined: Tue Aug 05, 2014 9:48 am
Location: India

Re: HBzebra PDF417 bad (error) coding?

Postby bosibila » Sat Mar 19, 2016 12:31 pm

Thanks, I also try with other online encoders and saw that HBzebra does not produce good result, but I want to hear another voice from FWH community and most experienced programers. Thanks for your time ...
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Re: HBzebra PDF417 bad (error) coding?

Postby bosibila » Tue Mar 22, 2016 8:40 am

Hello to all members,
as you see above I have trouble to implement HBzebra into my application and I found commercial solution, component from http://www.java4less.com (Valencia). Does someone work with this activex/.net component and have experience with DLL or activex?

I rewrite old code and here is working example:
Code: Select all  Expand view
#include "fivewin.ch"

function Main
    public oWnd

    DEFINE ICON oIcon RESOURCE "TASK"
    DEFINE window oWnd TITLE "Lista: " FROM 0,0 to 600,800  PIXEL
    ACTIVATE window oWnd ON init drawBarcode()

return nil

*
*
*
function drawBarcode()

   local hDC := oWnd:GetDC()
   local oPrn, bBar, bc
   local var, crlf:=chr(10) //+chr(13)+chr(10)

   cText:="HRVHUB30"+crlf+;
           "HRK"+crlf+;
           "000000000007085"+crlf+;
           "DFADFF SDF DDSD."+crlf+;
           "dfsg sdfsdf25"+crlf+;
           "43434 wqwqwk"+crlf+;
           "sfgsfgfg asdfak m d.d."+crlf+;
           "Bani asd saddin"+crlf+;
           "1Q010 SDFSDD"+crlf+;
           "HE3456600005645648560"+crlf+;
           "HT01"+crlf+;
           "10WEER40WERWR76171-8"+crlf+;
           "OTLC"+crlf+;
           "45345345e4 34545345ge z4351.2016."+crlf

   bc = CreateObject("RPDF417.RPDF417X")
   bc:standalone:=.t.
   bc:pdfbackColor:=16777215
   bc:pdfECLevel:=5
   bc:pdfbarWidth:=1.4
   bc:pdfbarHeight=3
   bc:pdfleftMargin=0
   bc:pdftopMargin=0
   bc:pdfcode:=cText
   bc:saveToBMP(".\test")

   //------------------------------------------------------------------

   bBar:=DibRead(".\test.bmp")
   DibDraw( hDC, bBar )                               // draw on window

   //------------------------------------------------------------------
                                                      // print
   nWidth :=DibWidth(bBar)*5
   nHeight:=DibHeight(bBar)*5
   PRINT oPrn NAME "PDF417 code print" PREVIEW
      PAGE
          DibDraw( oPrn:hDCOut, bBar,,50,100,nWidth,nHeight )
      ENDPAGE
   ENDPRINT

return


Image
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 110 guests