IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Page 1 of 3 1 2 3 >
Topic Options
#31137 - 07/07/10 09:08 AM Code 128 barcode not using recomended encoding
Danny Seager Offline
OL Newbie

Registered: 07/07/10
Posts: 30
When I create a Code 128 barcode my barcode scanner complains about the structure. This seems to be because PP does not use the recomended encoding for the barcode and adds extra lines.

This would be fine if the barcode we need to print was large but as it's quite small the extra lines means that the white spaces seem to close up.

Is there anyway to create a barcode using the standard encoding? - I'd rather avoid having to use a separate barcode font.

Top
#31138 - 07/07/10 03:05 PM Re: Code 128 barcode not using recomended encoding
cosimo Offline
OL Expert

Registered: 10/31/01
Posts: 1286
Loc: montreal
Hi,

Are you using a barcode fornt or our barcode object?

Cosimo

Top
#31139 - 07/07/10 04:30 PM Re: Code 128 barcode not using recomended encoding
Danny Seager Offline
OL Newbie

Registered: 07/07/10
Posts: 30
I'm using the barcode object.

The extra lines might not be a problem (it still reads the same barcode number) if I could put some bar width reduction on... but that feature doesn't exist.

I was wondering if anything could be done with press talk....

I've tried the font route but have had trouble loading the font I've got - but i've not really spent much time on the font method yet as

a) I don't want to use fonts if I can help it
b) I wont be able to do bar width reduction on the font method either.

All ideas welcome as apart from the barcode issue the software is working very well for us.

Top
#31140 - 07/07/10 04:58 PM Re: Code 128 barcode not using recomended encoding
Anonymous
Unregistered


Hello Danny,

Our barcode object does follow the standards as defined for 128. However, 128 comes in 3 different subsets and if you are comparing the barcode itself to another one, it is possible that the other barcode is using a different subset (or even changes subset which is possible).

If you just want to play with the dimensions of the barcode there are 2 different ways to do so. You can play with the mils (the bar widths) that will play with the width of the barcode.

Another possibility is to use a scale in PressTalk before the object.

scale(0.5,0,5) would show your barcode "half sized". You can play with those numbers and make the barcode more or less any size that you want.

On a side note, if the barcode is showing only numbers, you might want to try subset C which is used for numerical data.

Top
#31141 - 07/07/10 04:59 PM Re: Code 128 barcode not using recomended encoding
Anonymous
Unregistered


Danny,

On your first post you say that PP does not use the recomended encoding for a code 128 barcode. Then you say that there are no bar width reduction option in PlanetPress Suite... I must respectfully disagree with both affirmations, based on my understanding of what is a barcode encoding and what is the barcode width: You can customize both in the barcode object.

I would suggest that you take a closer look at the barcode object's properties, specially those on the 'barcode options' tab. For example, have you tried reducing the value of the barcode object's Bar with (in mils.) property?

Hope this helps

Benoit

Top
#31142 - 07/07/10 05:21 PM Re: Code 128 barcode not using recomended encoding
Danny Seager Offline
OL Newbie

Registered: 07/07/10
Posts: 30
I've tried all 3 subsets but I am willing to try them again.

Am I right in thinking that if I have 15 numbers I will need to prefix the barcode with a 0 to use subset type C? My barcodes are 15 numeric digits.

I have a barcode that I generated in another system and it reads a perfect A... but when I compare it to the barcode generated from PP with the exact same number the PP one clearly has more lines.

My barcode scanner provides a message and when you check thier help documents it states

Quote:
Case where the error message "Sub Optimal Packing" appears in the structure window when verifying a Code 128 barcode (including GS1-128). This structural error in the code is caused because the recommended method of encoding this data has not been followed and as a result the bar code contains many more bars than it needs to. We call this error 'Sub-optimal packing' and although it does not directly affect the print quality (it may indirectly if the size of the bars has needed to be reduced to encode the extra bars), it is displayed as an error because the data has not been encoded according to the specification in the Code 128 standard
From : http://www.axicon.com/guide/module_3.htm

I've only been working with this software for 2 days so please forgive me if I'm asking questions that are obvious but does changing the "Bar widths (in mils)" change the width of each bar or just change the with of the barcode as a whole? - it seems to change the whole barcode width.

Thanks
Danny

i'll have a go at the scale methods.

Top
#31143 - 07/07/10 05:35 PM Re: Code 128 barcode not using recomended encoding
Anonymous
Unregistered


Danny,

Maybe this example can help. This is an example 'custom data selection' for a barcode 128. The barcode is encoded in subset A, then switches to subset C, then switches back to subset A.

Code:
='420'+'^099'+'12345678'+'^101'+'ABC'
When in subset A, '^099' indicates to switch to subset C. That will reduce the barcode width for the next 8 digits (12345678). Then '^101' means to switch back to subset A.

You can compare the above value with this one, using only subset A
Code:
='42012345678ABC'
in the first example the barcode is shorter because it is using subset C to encode '12345678'

Hope this helps!

Ben

Top
#31144 - 07/07/10 06:24 PM Re: Code 128 barcode not using recomended encoding
Danny Seager Offline
OL Newbie

Registered: 07/07/10
Posts: 30
I'm not a barcode expert (I'm a programming looking at integrating this into our workflow systems) but my understanding of bar width reduction is that the black lines are reduced in width (which in turn actually increases the width of the white space. Then when the barcode is printed the ink is put down and there is spread of ink so the barcode lines fatten up to what they should be. - i'm 99% sure that this is the whole point of bar width reduction.

PP's bar width option changes the entire barcode (including the white spaces).

I'm going to try a combination of the scale() function and increase the bar width - I'm working remotely at the moment so I can not test how the barcodes scan until tomorrow.

Top
#31145 - 07/08/10 05:40 AM Re: Code 128 barcode not using recomended encoding
Danny Seager Offline
OL Newbie

Registered: 07/07/10
Posts: 30
Right... to start of with just a thank you for your help so far.

I've scanned the barcode that I had printed from another system and discovered it was a Subset C barcode. and if I add a 0 to my barcode (as a check digit) I can get it to read an A reading... but then my barcode has an extra 0 in.

From what I read a Sub set C requires an even number of digits.

I've then created the barcode on yet nother system and scanned it and they have used subset C for all the characters apart from the last character which is a subset A.

Anyway I've replicated this on the PP software using the method Ben gave me and I get it to read a B.... this is where bar width reduction would come in to do that last bit of tweaking (I should also say that it reads a B on a laser printer but on the digital press that I will be outputting it on I suspect it will read a C or D.

I'll update you on that but can anyone confirm that the bar width reduction on the PP software does not work in the way I described above (which is the way I believe bar width reduction is supposed to work)

Thanks
Danny

Top
#31146 - 07/08/10 05:59 AM Re: Code 128 barcode not using recomended encoding
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
Danny
Your understanding of bar width reduction is correct. The black bars are supposed to be very slightly thiner than the corresponding white bars in order to compensate for ink spreading in printing and to optimise the scanning and decoding process.

However, with modern high resolution printers and scanners it is completely unnecessary and this is unlikely to be the cause of your problems.

The optimal packing that your error refers to probably means that it is looking for a subset C code, which encodes 2 digits in each character.
If you have an odd number of digits then you can switch codes at the end and print the last character as a subset A or subset B.

See this post for PPTalk code that switches to Subset B PPTalk for C128 barcode and here is the corresponding code for switching to code A.

Code:
 moveto(0,0)
define(&_DataSel_,string,'')
set(&_DataSel_,&_DataSel_ + '01234567890')
define(&_Y2_,measure,&height)
if(&height < 0)
set(&_Y2_,0)
endif()
define(&BarHeight,measure,&height)
define(&BarWidth,measure,0.0120)
define(&BarType,integer,1)
setfillcolor([0,0,0,100])
showbarcode('\209')
define(&_x_,integer,length(&_DataSel_))
define(&_z_,integer,0)
for(&_z_,1,2,&_x_ - 1)
showbarcode(c128(mid(&_DataSel_,&_z_,2)))
endfor()
if(eq(mod(&_x_,2),1))
showbarcode('\205' + right(&_DataSel_,1))
endif()
define(&_bcTotal_,integer,105)
define(&_check_,integer,0)
define(&_bci_,integer,1)
for(&_z_,1,2,&_x_ - 1)
&_bcTotal_ := &_bcTotal_ + (&_bci_ * (strtoint(mid(&_DataSel_,&_z_,2))))
&_bci_ := &_bci_ + 1
endfor()
if(eq(mod(&_x_,2),1))
&_bcTotal_ := &_bcTotal_ + (&_bci_ * 101) + ((&_bci_ + 1) * (strtoint(right(&_DataSel_,1)) + 16))
endif()
&_check_ := mod(&_bcTotal_, 103)
showbarcode(char(&_check_ + 32))
showbarcode('\212')
&width := &current.x
moveto(&current.x / 2.0,&_Y2_+0.16)
showcenter(&_DataSel_) 
I lifted this code straight out of a PlanetPress Version 5 barcode object. Back in V5 PP did this automatically!.

Hope that helps
Stuart

Top
Page 1 of 3 1 2 3 >