Detect the encoding of a file using chardet.
# Define conversion factor (1 mm = 11.81 pixels at 300 DPI) TOTAL_LABEL_WIDTH_PX = TOTAL_LABEL_WIDTH * MM_TO_PIXELS TOTAL_LABEL_HEIGHT_PX = TOTAL_LABEL_HEIGHT * MM_TO_PIXELS ...