pyhanko.pdf_utils.barcodes module¶
- class pyhanko.pdf_utils.barcodes.BarcodeBox(barcode_type, code)¶
Bases:
pyhanko.pdf_utils.content.PdfContent
Thin wrapper around python-barcode functionality.
This will render a barcode of the specified type as PDF graphics operators.
- render() bytes ¶
Compile the content to graphics operators.
- class pyhanko.pdf_utils.barcodes.PdfStreamBarcodeWriter¶
Bases:
barcode.writer.BaseWriter
Implementation of writer class for the python-barcode library to output PDF graphics operators. Note: _paint_text is intentionally dummied out. Please use the functionality implemented in pyhanko.pdf_utils.text instead.
- property command_stream: bytes¶
- write(content, fp)¶
- save(filename, output)¶
Saves the rendered output to filename.
- Parameters
- filenameString
Filename without extension.
- outputString
The rendered output.
- Returns
The full filename with extension.
- Return type
String