Problem reading the generated barcode

AitorEGAitorEG Member Posts: 342
Hi everyone,
I'm, using NAV2013R2, and I'm generating a barcode in a report, with this utility:

http://www.archerpoint.com/blog/Posts/printing-barcodes-rtc-report

I'm generatin code128 barcodes. But I've seen, that the barcode can't be read if it is too small. The same barcode, but a little bigger, can be read. So, I thought that could be a problem of the generated BMP resolution. Is there any way to improve that resolution?
On the other hand, I also tried to generate the barcodes using different fonts I've downloaded. Even the resolutions looks realy good, the barcodes can't be read. And I think that this issue could be because of the data transformation. I directly wrtite a text, for example, "MF118.160", in the layout editor, and change the font to for exameple, code128.ttf. Should I introduce any charater befora/afeter my text, to convert the to the font?

Thank you very much for your help

Answers

  • AitorEGAitorEG Member Posts: 342
    edited 2017-03-15
    I'm making the conversion with this function:
    
    TransformTextIntoBc128(pText : Text[250]) RetVal : Text[250]
    
    StartChar:='Ú';
    StopChar:='Ü';
    Checksum:=104;
    
    FOR i:=1 TO STRLEN(pText) DO BEGIN
      currentchar:=pText[i];
      Checksum := Checksum +(i*(currentchar-32));
    END;
    ChecksumChar:= Checksum MOD 103;
    ChecksumChar:= ChecksumChar+32;
    
    // convert SPACE to ALT+0128
    pText:=CONVERTSTR(pText,' ','°');
    
    RetVal:=STRSUBSTNO('%1%2%3%4',StartChar,pText,ChecksumChar,StopChar);
    EXIT(RetVal);
    
    And I have installed the Code128bWin font,.Everything has been downlaoded from:

    http://mibuso.com/downloads/barcode-128-with-fonts-sample

    The barcode is still unreadable...
    I add a image of the generated barcode:
    huardd8e86fm.png
  • AitorEGAitorEG Member Posts: 342
    We have also tried with this integration:
    http://www.kauffmann.nl/2016/01/09/web-services-examples-part-3-generate-barcode/
    Abd we can't read codes of 9 characters or more...
    Any tip?
Sign In or Register to comment.