I want to create a document with serial barcode (10 per page) so I am using the code bellow to generate a barcode:
my_code = Code128(document)
my_code.save(document)
The result of this code is an svg picture...So I want to insert this svg picture into a table in docx file and I am using this piece of code for that:
doc = Document('assets/test.docx')
tables = doc.tables
p = tables[0].rows[1].cells[0].add_paragraph()
r = p.add_run()
r.add_picture('BL22002222.svg', width=Inches(3), height=Inches(1))
doc.save('assets/test.docx')
but it through this error:
docx.image.exceptions.UnrecognizedImageError
I want to generate a printed pages pdf or docx i don't care the most important is that it contain barcode