BarcodeFrame#
- class BarcodeFrame[source]#
Bases:
SimpleFrame
Class for a frame containing a barcode. It is a simple frame with no sub-frames in it. A barcode (e.g. “QRCODE”) will be printed in a rectangle with a given width and height.
- __init__(parent: ContainerFrame, barcode_text: str = '', barcode_type: BarcodeType = BarcodeType.QRCODE, max_width: float = 0.0, max_height: float = 0.0, frame_id: str = '')[source]#
Creates a new BarcodeFrame object
- Parameters:
parent – The container frame to which the text frame belongs
barcode_text – Text The data
barcode_type – The barcode type enum BarcodeType
max_width – Width of the barcode
max_height – Height of the barcode
frame_id –
- property max_width: float#
Maximal width for the frame
- Getter:
Returns the maximal width
- Setter:
Sets the maximal width
- property max_height: float#
Maximal height for the frame
- Getter:
Returns the maximal height
- Setter:
Sets the maximal height
- property barcode_text: str#
The text to be printed as barcode
- Getter:
Returns the text
- Setter:
Sets the text
- property barcode_type: BarcodeType#
The barcode type
- Getter:
Returns the barcode type
- Setter:
Sets the barcode type
- property width: float#
The width for the barcode
- Getter:
Returns the width
- Setter:
Sets the width
- property height: float#
The height for the barcode
- Getter:
Returns the height
- Setter:
Sets the height
- property frame_id: str#
The frame id
- Getter:
Returns the frame id
- Setter:
Sets the frame id
- property h_align: HAlign#
Horizontal alignment of the frame
- Getter:
Returns the horizontal alignment of the frame
- Setter:
Sets the horizontal alignment of the frame
- property keep_together: bool#
Flag if the frame shall be kept together on one page
- Getter:
Returns the flag
- Setter:
Sets the flag
- property margin_bottom: float#
Bottom margin in the frame
- Getter:
Returns the bottom margin
- Setter:
Sets the bottom margin
- property margin_left: float#
Left margin in the frame
- Getter:
Returns the left margin
- Setter:
Sets the left margin
- property margin_right: float#
Right margin in the frame
- Getter:
Returns the right margin
- Setter:
Sets the right margin
- property margin_top: float#
Top margin in the frame
- Getter:
Returns the top margin
- Setter:
Sets the top margin
- property parent_frame#
The parent frame
- Getter:
Returns the parent frame
- Setter:
Sets the parent frame
- set_margin(margin: float)#
Sets the margin on all four sides to the given value
- Parameters:
margin – Margin in mm
- property use_full_height: bool#
Flag if the frame shall use the full possible height for the frame
- Getter:
Returns the flag
- Setter:
Sets the flag
- property use_full_width: bool#
Flag if the frame shall use the full possible width for the frame
- Getter:
Returns the flag
- Setter:
Sets the flag