Author Topic: Barcode generation in Scripter  (Read 368 times)

paolobb4

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Barcode generation in Scripter
« on: April 01, 2019, 06:54:43 pm »
Good day people   :)
I'm new to scribus and I'm working on some pdf generation with scripting. I was wondering if there's a way to call the standard Scribus barcode generation tool from script, and more generaly how to call any standard Scribus tool.

I have no idea of how or where does scribus define it's tools but there must be some code somewhere and I really, really hope it is also callable from Scripter  ;D

(I did see there's an example for a script that generates code39 barcodes but I'm hoping not to have to reinvent the wheel just to render the code128 barcodes that I need)

Cheers everyone.

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1984
  • Karma: 26
    • the graphics lab
Re: Barcode generation in Scripter
« Reply #1 on: April 01, 2019, 07:38:29 pm »
ciao paolo

it would not be that hard to add a command to the scripter API for it. but, in this case, i'm not sure it's the right thing do (it would be putting a dependency of a plugin to a different and unrelated plugin).

in this case, i guess it's pretty simple to find a python library that will generate some png or svg that you can then include in scribus.
the scribus code also uses an external library to convert your input into a rester image (i guess...)

please share your solution so that other people won't have to reinvent the wheel!

ciao
a.l.e

paolobb4

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Re: Barcode generation in Scripter
« Reply #2 on: April 23, 2019, 06:43:26 pm »
Hello  :)
I ended up using the library pyBarcode wich works quite nicely.