Skip to content

Commit

Permalink
feat: add herma 10003 labels
Browse files Browse the repository at this point in the history
Add setup for HERMA No. 10003 (former article No. 4345). Measurements are taken from the
API called by the HERMA label assistant (https://backend2.herma-eao.de/eao/article/bf388863/10003).

doc: Update usage with herma10003 option for format flag

doc: add HERMA 10003 to supported sheets
  • Loading branch information
zsewa committed Jul 15, 2024
1 parent 8bc64be commit 5a602ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pip install paperless-asn-qr-codes
## Usage

```
usage: paperless-asn-qr-codes [-h] [--format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}] [--digits DIGITS] [--border] [--row-wise] [--num-labels NUM_LABELS] [--pages PAGES]
usage: paperless-asn-qr-codes [-h] [--format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371,herma10003}]
[--digits DIGITS] [--border] [--row-wise] [--num-labels NUM_LABELS] [--pages PAGES]
[--start-position START_POSITION]
start_asn output_file
Expand All @@ -25,7 +26,7 @@ positional arguments:
options:
-h, --help show this help message and exit
--format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}, -f {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}
--format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371,herma10003}, -f {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371,herma10003}
--digits DIGITS, -d DIGITS
Number of digits in the ASN (default: 7, produces 'ASN0000001')
--border, -b Display borders around labels, useful for debugging the printer alignment
Expand Down Expand Up @@ -64,6 +65,7 @@ The default is Avery L4731.

Currently tested and known working are:
- Avery L4731 (DIN A4 Labels)
- HERMA 10003 (formerly HERMA 4345)

## Tips & Tricks

Expand Down
9 changes: 9 additions & 0 deletions paperless_asn_qr_codes/avery_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ class LabelInfo:
margin=(54, 36),
pagesize=LETTER,
),
# HERMA No. 10003 labels (former article No. 4345)
"herma10003": LabelInfo(
labels_horizontal=5,
labels_vertical=16,
label_size=(35.56 * mm, 16.93 * mm),
gutter_size=(2.54 * mm, 0),
margin=(11.02 * mm, 13.06 * mm),
pagesize=A4,
),
}

RETURN_ADDRESS = 5167
Expand Down

0 comments on commit 5a602ad

Please sign in to comment.