ZAZ BarCode
Extension for insert barcode in LibreOffice documents
Barcodes provided
- code39
- code128
- ean
- ean13
- ean8
- gs1
- gtin
- isbn
- isbn10
- isbn13
- issn
- jan
- pzn
- upc
- upca
- qrcode
Calc
Writer
Draw
Impress
By code
import uno
CTX = uno.getComponentContext()
SM = CTX.getServiceManager()
def create_instance(name, with_context=False):
if with_context:
instance = SM.createInstanceWithContext(name, CTX)
else:
instance = SM.createInstance(name)
return instance
def main():
from com.sun.star.beans import NamedValue
zaz = create_instance("net.elmau.zaz.BarCode")
args = (
NamedValue('Type', 'qrcode'),
NamedValue('Data', 'libreoffice.org'),
)
path = zaz.execute(args)
print(path)
return
import easymacro as app
def main():
zaz = app.create_instance("net.elmau.zaz.BarCode")
args = {
'Type': 'qrcode',
'Data': 'libreoffice.org',
}
args = app.dict_to_named(args)
path = zaz.execute(args)
print(path)
return
Sub Main()
Dim args(2) As New com.sun.star.beans.NamedValue
zaz = createUnoService("net.elmau.zaz.BarCode")
args(0).Name = "Type"
args(0).Value = "qrcode"
args(1).Name = "Data"
args(1).Value = "libreoffice.org"
path = zaz.execute(args)
MsgBox path
args(0).Name = "Type"
args(0).Value = "qrcode"
args(1).Name = "Data"
args(1).Value = "libreoffice.org"
args(2).Name = "Path"
args(2).Value = "/home/mau/tmp.svg"
zaz.execute(args)
End Sub