Skip to content

Convert international DHL Paket labels for actual label printing

License

Notifications You must be signed in to change notification settings

Chrismettal/DHLabel

Repository files navigation

DHLabel

PyPI - Version Repo Version PyPI - License PyPI - Python Version Donations: Coffee

This is a work in progress.

For some reason, DHL exported labels print over the entire A4 page, wasting half of your self sticking labels. Additionally, for international orders, an entire second A4 label is used for the CN22/CN23 document.

This tool grabs these two pages, deletes the half of the page that isn't required for anything, and puts both the label and CN22 on the same page for printing. Additionally, it will fill out the current date into the CN22/CN23 date field so you only need to sign it.

If you like my work please consider supporting me!

Installation

Pypi

Might be pushed to Pypi later idk.

Local (for development)

  • Clone the repo:

git clone https://github.com/chrismettal/dhlabel

  • Change directory into said cloned repo:

cd dhlabel

  • Install in "editable" mode:

pip install -e .

Usage

Execute dhlabel in the folder containing your downloaded labels fresh from DHL. Alternatively, specify the source and target paths after the command like dhlabel /path/to/source/pdf/folder /path/to/target/pdf/folder.

It will automatically detect national and international orders based on the number of pages in the original document and attempt to use as little pages as possible for your orders (First dumping each international order into one PDF page, before using half a page per national order).

2 files, DHLabels_YYYY-MM-DD.pdf and DHLabels_YY-MM-DD.csv will be created after completion, where the PDF contains all your labels in one file, and the CSV is a list of recipients and their tracking numbers.

Roadmap

  • Consolidate international labels into one page
  • Consolidate 2 national labels into one page
  • Find list of files
    • Detect national vs international order
  • Append multiple orders into the same file
  • Optionally shrink parts down to fit on smaller than A5 packages

Donations

If you like my work please consider supporting me!

License

GPLv3
This work is licensed under a GNU GPLv3 License.

About

Convert international DHL Paket labels for actual label printing

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages