1
0
Fork
You've already forked python-barcode
0

Is there EAN14 support? Trouble with EAN14 #103

Open
opened 2021年01月13日 19:07:29 +01:00 by moreplavec · 4 comments
moreplavec commented 2021年01月13日 19:07:29 +01:00 (Migrated from github.com)
Copy link

Just simple question: is it possible to use it to generate EAN14? PyPi says it is possible to use it for EAN14 (https://pypi.org/project/python-barcode/), but doc says just EAN13.

Thanks for the answer.

Just simple question: is it possible to use it to generate EAN14? PyPi says it is possible to use it for EAN14 (https://pypi.org/project/python-barcode/), but doc says just EAN13. Thanks for the answer.
WhyNotHugo commented 2021年01月14日 14:57:12 +01:00 (Migrated from github.com)
Copy link

Yes, it's ean14 or barcode.ean.EuropeanArticleNumber14 (e.g.: all the docs for EAN13 apply, just replace 13 with 14).

It's documented in the latest master, but not in the last stable release. Those docs will be published with the next release.

Yes, it's `ean14` or `barcode.ean.EuropeanArticleNumber14` (e.g.: all the docs for EAN13 apply, just replace 13 with 14). It's documented in the latest `master`, but not in the last stable release. Those docs will be published with the next release.
moreplavec commented 2021年01月18日 11:03:04 +01:00 (Migrated from github.com)
Copy link

Thanks for fast replay, but i have problem reading EAN14 barcodes. No problem with EAN13, but EAN14 is "somehow" wrong?

I tried to generate EAN14 form product IDs:

for product in products:
 code = product.ID.get_text().strip() 
 length = len(code)
 produkt_id_10 = (10 - length) * '0' + str(code)
 ean14_bez = '104' + produkt_id_10 # EAN14 without last digit
 ean14 = barcode.get('ean14', ean14_bez) # EAN14 with last digit
 ean14_barcode = ean14.save(ean14)

This will generate EAN14 barcodes named as EAN14 number. But it's impossible to read them. Please, try:

EAN14 barcode generated, but unreadable: https://svgshare.com/s/TC_
EAN14 barcode generated, but read as EAN13 with my reader: https://svgshare.com/s/TDk

Do you know what's wrong?

Thanks for fast replay, but i have problem reading EAN14 barcodes. No problem with EAN13, but EAN14 is "somehow" wrong? I tried to generate EAN14 form product IDs: ``` for product in products: code = product.ID.get_text().strip() length = len(code) produkt_id_10 = (10 - length) * '0' + str(code) ean14_bez = '104' + produkt_id_10 # EAN14 without last digit ean14 = barcode.get('ean14', ean14_bez) # EAN14 with last digit ean14_barcode = ean14.save(ean14) ``` This will generate EAN14 barcodes named as EAN14 number. But it's impossible to read them. Please, try: EAN14 barcode generated, but unreadable: [https://svgshare.com/s/TC_](https://svgshare.com/s/TC_) EAN14 barcode generated, but read as EAN13 with my reader: https://svgshare.com/s/TDk Do you know what's wrong?
moreplavec commented 2021年01月18日 12:13:15 +01:00 (Migrated from github.com)
Copy link

I tried to find what's wrong and triend another solutions. It generates same last digit, but all EAN14 generators i tried added (01) at the beginning of the barcode. I found this info: "the first two numbers are the Application Identifier of the EAN-128: (01). You cannot change them. They are part of the code.". Maybe it should be added to generator?

I tried to find what's wrong and triend another solutions. It generates same last digit, but all EAN14 generators i tried added (01) at the beginning of the barcode. I found this info: "the first two numbers are the Application Identifier of the EAN-128: (01). You cannot change them. They are part of the code.". Maybe it should be added to generator?
WhyNotHugo commented 2021年04月07日 17:52:59 +02:00 (Migrated from github.com)
Copy link

Sorry, missed this comment.

So there should be in total of 16 digits, with the leading 01?

Sorry, missed this comment. So there should be in total of 16 digits, with the leading 01?
Sign in to join this conversation.
No Branch/Tag specified
main
pre-commit-ci-update-config
extensibility
fix_sizes
feature/longer_guard_bar
ean-without-checksum
readme-formatting
cleaning
cleanup
srolin/master
michieldwitte/left-alignment-fix
v0.13.1
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.3
v0.8.2
v0.8.1
v0.8.0
0.8beta1
0.7
0.7beta4
0.7beta3
0.7beta2
v0.6
v0.6b3
v0.6b2
v0.6b1
v0.5.0
v0.5.0b1
v0.4.3
v0.4.2
v0.4.1
v0.4
v0.4b2
v0.4b1
v0.3
v0.3b1
v0.2.1
v0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WhyNotHugo/python-barcode#103
Reference in a new issue
WhyNotHugo/python-barcode
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?