bwipp / postscriptbarcode

Barcode Writer in Pure PostScript
https://bwipp.terryburton.co.uk
MIT License
462 stars 64 forks source link

Error: bwipp.GS1unknownAI#3497: AI GdU(91: Unrecognised AI #269

Closed v0-v0-git closed 2 months ago

v0-v0-git commented 2 months ago

If the character string contains ")" or "(" an error occurs when generating the datamatrix.

'''Error creating DataMatrix: bwipp.GS1unknownAI AI GdU(91: Unrecognised AI

Process finished with exit code 1'''

As far as I understand, in GS1 text, extra parentheses should be encoded using ^040 (left parenthesis) and ^041 (right parenthesis).

If I replace them with characters ^040 and ^041, then there is still an error: '''Error creating DataMatrix: bwipp.GS1badCSET82character AI 21: Invalid CSET 82 character

Process finished with exit code 1'''

terryburton commented 2 months ago

As far as I understand, in GS1 text, extra parentheses should be encoded using ^040 (left parenthesis) and ^041 (right parenthesis).

You require the parse option. Refer to the documentation:

https://github.com/bwipp/postscriptbarcode/wiki/GS1-Application-Identifier-Standard-Format

v0-v0-git commented 2 months ago

Thanks, I use this option and option parsefnc right away, but there is an error

datamatrix = generate_barcode( barcode_type='gs1datamatrix', data=data, options={"parsefnc": True} )

terryburton commented 2 months ago

Wrong project. This is not BWIP-JS, and those options work in BWIPP.