Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

BarCode, Code 128 size

Hi,

I am trying to find the fitting size for a barcode on a preprinted label in code 128.

Unfortunately, if I use BarWidth of 0.12 it's to small and BarWidth of 0.13 it's too big.

See linked image below.

https://pasteboard.co/XvSklfW5Fl6d.jpg

I also tried to use a police in code 39, but it's too small and no scanner can read it.

My versions are :
Delphi version : Tokyo 10.2
ReportBuilder version : 20.02 Build 67
Operating System : Windows 10 21H2
Printer model : cab EOS2/300

Can you help me generate a barcode that just fit inside 2.1 x 0.75 cm ?

Thanks in advance for you help.

Comments

  • edited July 2023
    Hi Jean,

    BarCodes must to adhere to the specification defined for the symbology (BarCodeType).

    Code128 details are here

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

    The BarWidth and WideBarRatio properties provide a limited amount of control. The values for these properties must be within the range defined by the BarCodeType specification.

    For Code128 there are 3 different encodings that can be used. By default TppBarCode.AutoEncode is True, but you can set to False and manually encode as defined here

    https://rbwiki.digital-metaphors.com/rcl/barcode/manual-encode-128/

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard,

    Thanks for the hint, I guess I could try to make use of Code 128 Character Set C, to reduce the length.

    Will try it soon.

    Have a nice weekend.
    Jean
  • Hello Nard,

    I have encoded my value manually in Code 128 Character Set C :

    BarCode1.Data := Chr(208) + 'S2' + Chr(204) + '302093000002';

    This code works, the barcode is 2 mm shorter, but still to long. Do you think there is a way to make it shorter ? I don't see it.

    Thanks,
    Jean



  • Hi Jean,

    Decreasing BarWidth property will result in shorter length. For Code 128 TppBarCode defaults BarWidth to 0.254 mm. Perhaps check your barcode reader for definition of valid range. I tried Google but did not find a definitive answer.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.