[reportlab-users] code128.py
Robin Becker
robin at reportlab.com
Mon Jan 4 06:52:57 EST 2016
Hi Klaas,
happy new year and thanks for the patch, I'll try and test soon. Do you have an
example test string? That made a difference fairly obvious?
--
Robin Becker
On 04/01/2016 11:35, Klaas Feenstra wrote:
> Hello,
>
> After using reportlab for creating barcodes, I realised the optimization
> for Code128 was not correct. It was only optimizing the end of the barcode
> string.
>
> I made modifications for the trailingDigitsToC function. See below. Now all
> string will be analysed for optimizations. Probably there will be a better
> algorithm, but this is working.
>
> def _trailingDigitsToC(self, l):
> # Optimization: trailing digits -> set C double-digits
...........
> else:
> nl = nl + l[startpos:i+1]
> i += 1
> return nl
>
>
........
More information about the reportlab-users
mailing list