Little script that transforms Deutsche Post Briefmarken PDFs to printable PNGs for 62mm endless Brother QL labels.
At the end of the script, there are two lines that define the input file and output folder. Currently the input file must be named "Briefmarken.pdf" and there must be a folder in the location that the script is being executed in that is named "briefmarken".
Install PyMuPDF:
pip install PyMuPDF You also need brother_ql. I suggest you use the inventree fork.
pip install brother-ql-inventree- When purchasing stamps, select the Brother QL 62mm endless labels as the format (before adding to the basket at Deutsche Post online shop).
- Purchase and download PDF.
- Rename PDF to
Briefmarken.pdfand place in the same folder aspdf2png.py. - Create or make sure there is a
briefmarkenfolder in the same location. - Run
python pdf2png.py. - The individual labels will now be inside the
briefmarkenfolder namedpage_<number>.png.
Run the following bash commands inside the briefmarken folder to print them one after another:
for file in *; do brother_ql print -l 62 "$file"; doneIf the brother_ql command throws an error, you probably need to set the environment variables. In my case:
export BROTHER_QL_PRINTER=/dev/usb/lp0
export BROTHER_QL_MODEL=QL-500Will never happen
- PDF and destination location as input arguments
- Print after converting
- Interactive CLI for the above
- Run as a server to avoid having to SSH into my orange pi every time I want to print stamps