Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to display PDF417 barcode through the application, here iam able to display but if i read through the scanner it is not able to detect as PDF417 barcode.

I am finding problem in identifying PDF417 barcode through barcode scanner, iam suspecting that is because the calculation of right indicator and left indicator is wrong.



i referred this equation in finding Left indicator code word and right indicator code word. i.e



Cluster

Left Row Indicator
Cluster 0 30x + y
Cluster 3 30x + z
Cluster 6 30x + v

Right Row Indicator
Cluster 0 30x + v
Cluster 3 30x + y
Cluster 6 30x + z

Where:



x = (row number - 1) / 3

y = (number of rows – 1) / 3

z = (error correction level) * 3 + (number of rows – 1) mod 3

v = number of data columns – 1

here

number of rows = 8

row number from 1 to 8

error correction level = 4

number of data columns = 2.



What iam doing is right? please do suggest, on this.

What I have tried:

So calculation of cluster and the for left row indicator i have calculated and i have used byte level as option where the data must be converted into base 900. then i have take 2d array where i placed data accourding by row wise.
Posted
Updated 19-Jun-19 1:55am

Creating any barcode from scratch is always fun - I've haven't done it for a while (I used to design industrial ink jet printers, so I've implemented most 1D formats) but if it doesn't work it's always hard to work out why. And 2D versions are more of a pain because there are more variables.

So start by finding a valid barcode in the right format with known data that your scanner can read.
Then use exactly the same data to create your version, and compare them. Either print them on thin paper and view through them both with a strong light, or load them as separate layers into a good paint program - GIMP may do, but I use PaintShop Pro, and Photoshop will also do it - then lower the opacity of the topmost layer so you can see the differences.

When you know the areas in which they differ, you can start looking at what those areas are, and why they are different - but you need that information first, or you are just whistling in the dark as far as the problem in your code is concerned.
 
Share this answer
 
i found the solution, as i was doing the calculation wrong. here we must take each divide input data as 6 bytes of data and apply same byte level calculation.

Example1:

if input data is 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 in this example input data is not perfectly divided by 6. hence here fist 6 bytes will be applied with bytle level calculation and remaning data will be considered as it is.

Example2:
if input data is 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc here nuber of input given is 12 bytes which is divisible by 6 i.e 12/6 = 2 hence it makes 2 groups each group of 6 bytes, each group which contains 6 bytes of data will applied with byte level calculation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900