The code for code word calculation is today:
symbol->option_2 =(int)(0.5 + sqrt((longueur + k) / 3.0));
My impression is that many other implementations use the:
symbol->option_2 =(int)(sqrt((longueur) / 3.0));
Are there any advantages with the current one? I think that Zint used the other one earlier (It would fit my purposes better).
I checked back to march 2014 (start of my svn shadow repository).
It was always like that and was never changed.
What would be the reason to change it ?
Thank you,
Harald
I have a partial answer.... this code has always been the same right back to version 1.0 from 2007. Given that I had little understanding of PDF417 at the time (and didn't have a copy of the standard) I suspect it was an arbitrary decision.
In principle I would have no problem with making this change, but I think some experimentation is required before making a firm decision.
Hi guys,
ok then my suspicion that it was changed during development is obviously wrong. I also can't say if my suggestion to change it is reasonable. You guys know the standard much better than me, so I leave it to your good judgement to decide. If we were to change it, however, it would be one less thing for me to manually change when updating Zint in my application.
(Zebra printers for example, use the algorithm that I suggest above)
I don't think, the standard says something about the default width to size ratio, if nothing is given.
That is more a design choice.
ZPL is often a bit "basic" to my experience and choose simple solutions.
If you could show the advantage of your formula and what it does practically, it would be appreciated.
I suppose, k is the number of check codewords. So including them is a good idea.
Thats why I prefer the present one. But I did not check at all.
I will try to get a hand on the standard and come back (also on the height magnification).
Thank you,
Harald
I have had a look at the standard and you are right, Harald, there is no guidance for the height/width aspect ratio other than to say that the capabilities of the scanner should be considered.
Zebra's formula means that a change in ECC changes the aspect ratio, whereas the Zint formula preserves the aspect ratio irrespective of ECC.
As this seems to come down to preference I think I would rather keep the established method.
Ok, then it would make sense to keep the Zint philosophy here. Thank you for your thoughts about this.