Search code examples
pythondatamatrix

Decoding DataMatrix containing GS1 seperator with Python


So I am trying to decode a data matrix that contains data that is in ISO/IEC 15434 syntax for high-capacity ADC media using Python.

I am using this code:

     def extract_dataMatrix(self):
        dm_read = DataMatrix()
        #return (dm_read.decode(self.content.size[0],self.content.size[1], buffer(self.content.tobytes())))
        self.informations.append(Datamatrix(dm_read.decode(self.content.size[0],self.content.size[1], buffer(self.content.tobytes()))))

The output is: Scanned barcode message

I need to find the [RS] and [GS] separators to be able to split the output into multiple components.

If anyone know another library faster than pydmtx is will be good too.


Solution

  • The character showing as a box containing 001E is RS, and 001D is GS. (These are standard control codes in ASCII.)