Skip to content

Converts stamps from a PDF file to individual PNGs in the correct resolution to be ptrinted on 62mm endless Brother QL labels.

License

Notifications You must be signed in to change notification settings

charel/QL-500-Briefmarken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

QL-500-Briefmarken

Little script that transforms Deutsche Post Briefmarken PDFs to printable PNGs for 62mm endless Brother QL labels.

Setup

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".

Requirements

Install PyMuPDF:

pip install PyMuPDF 

You also need brother_ql. I suggest you use the inventree fork.

pip install brother-ql-inventree

Usage

  1. When purchasing stamps, select the Brother QL 62mm endless labels as the format (before adding to the basket at Deutsche Post online shop).
  2. Purchase and download PDF.
  3. Rename PDF to Briefmarken.pdf and place in the same folder as pdf2png.py.
  4. Create or make sure there is a briefmarken folder in the same location.
  5. Run python pdf2png.py.
  6. The individual labels will now be inside the briefmarken folder named page_<number>.png.

Optional

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"; done
Debug

If 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-500

To Dos

Will 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

About

Converts stamps from a PDF file to individual PNGs in the correct resolution to be ptrinted on 62mm endless Brother QL labels.

Resources

License

Stars

Watchers

Forks

Languages