esbullington / zintpy

Python wrapper for libzint barcode library
4 stars 1 forks source link

the way to set do not show human readable text #1

Open ghiewa opened 9 years ago

ghiewa commented 9 years ago

in c sources, symbol->show_hrt=0 can disable show human readable text, how it in zintpy?

esbullington commented 9 years ago

I just added the option to set show_hrt in zintpy:

zint = Zint(symbology=YOUR_SYMBOLOGY_HERE, show_hrt=0)
zint.render("your text here")

Let me know if you have any problems, I'm not on a computer on which I can test the code at the moment.

ghiewa commented 9 years ago

actually, I did similar revision, it did not work.

here is my revison,

...
        if sys.platform == 'win32':
            self.zint = CDLL('./zint.dll')
        else:
            self.zint = CDLL("/usr/local/lib/libzint.so")
            if not self.zint:
                raise RuntimeError('Can not find libzint.so under /usr/local/lib/')

        self.zint.ZBarcode_Create.restype = POINTER(ZintSymbol)
...

meanwhile, I put libpng15.dll zint.dll under our zintpy folder.

result alway with human readable text.