[Python] Does anyone know a method no automate/semi-automate a way to transform a long binary...

Discussão em 'Python' iniciado por Stack, Junho 27, 2025.

  1. Stack

    Stack Membro Participativo

    I need some help with a QR code + Access + P-touch setup.

    So basically, I wrote a Python script that creates QR codes and saves them into a Microsoft Access .accdb file. The idea is to use Brother P-touch Editor to print labels, where the layout stays the same, but the QR code changes for each label depending on the data in the Access DB.

    Thing is — P-touch needs the QR codes to be saved as bitmap (BMP) images inside an OLE Object field in Access. I tried saving the QR codes as .png first, but P-touch doesn’t like that. Then I switched to saving them as .bmp, and while they look fine when opened with Paint, once I insert them into Access and try to use them in P-touch, it either says the image is invalid or just doesn’t show anything.

    I think the problem is that Access (and P-touch) expects the BMPs to be stored in some special OLE format — not just raw image bytes. Like maybe it needs a wrapper or header or something that gets added when you manually insert a picture from Access.

    What I’m trying to do: I just wanna generate a bunch of QR codes from text, store them in Access in the right format, and have P-touch Editor be able to use them automatically in my label template. No manual steps. Just update the DB and print.

    Anyone know how to properly insert BMPs into Access using Python so they show up correctly in P-touch?

    Thanks!

    Continue reading...

Compartilhe esta Página