[reportlab-users] Asterisks in barcode human readable text
Andy Robinson
andy at reportlab.com
Mon Apr 13 13:20:09 EDT 2015
Hi Kumar,
It sounds reasonable to me, as the text is for humans and not bar code
readers ;-)
The problem here is that nobody at ReportLab is a bar code specialists
- quite a lot of this code was contributed or copied from other
libraries years ago - and we don't know whether it is actually correct
or not to allow these characters in this position. If you have time
to check the specifications, and/or there is evidence that other
libraries do this, we could modify humanText to make life easier.
- Andy
On 13 April 2015 at 17:40, Kumar Varadarajulu
<Kumar.Varadarajulu at dealertrack.com> wrote:
> Dear All
>
> We are using reportlab2.6 with python 2.7 to generate barcodes of standard39
> and extended39 formats.
>
> We have a requirement, that asterisks (*) must be displayed in the human
> readable text of barcode.
>
> Looking at the implementation of Extended39 and Standard39 we can see that *
> is excluded from human readable text (Method _humanText in
> reportlab/graphics/barcode/code39.py:138)
>
> As a workaround we have created custom Extended39 and Standard309 formats
> and overridden _humanText method to include * ), and we have monkey patched
> function getCodes (in reportlab/graphics/barcode/__init__.py)
>
> Can you please let me know if we have a better alternative to overriding
> _humanText method to return asterisks (*) for human readable text.
>
> Thanks for your help.
>
> Thanks
> Kumar Varadarajulu
>
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>
More information about the reportlab-users
mailing list