Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make custom labels support Chinese printing? #7735

Closed
1 of 7 tasks
zly20129 opened this issue Jul 25, 2024 · 1 comment
Closed
1 of 7 tasks

How to make custom labels support Chinese printing? #7735

zly20129 opened this issue Jul 25, 2024 · 1 comment
Labels
question This is a question setup Relates to the InvenTree setup / installation process triage:not-checked Item was not checked by the core team

Comments

@zly20129
Copy link

Deployment Method

  • Installer
  • Docker Development
  • Docker Production
  • Bare metal Development
  • Bare metal Production
  • Digital Ocean image
  • Other (please provide a link Steps to Reproduce

Describe the problem*

The system comes with the Part--QR Code+Text template does not support Chinese part names, and the PDF downloaded locally only has IPN part numbers + non-Chinese characters.

I tried installing Chinese fonts and customizing a new template, but still no change.

Example is in follow:
屏幕截图 2024-07-25 144934

labels_ekn1ixB.pdf

Steps to Reproduce

1.Add a part, and named 贴片电阻;
2.Print Label with Part Label-Simple part label;
3.Download PDF file;
4.See None Ch Text。

Or

1.Upload a html label template named test_label;
2.File element in follow:
`{% extends "label/label_base.html" %}

{% load l10n i18n barcode %}

{% block style %}

.qr {
position: absolute;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}

.part {
font-family: 'WenQuanYi Micro Hei', Arial, Helvetica, sans-serif;
display: flex;
position: absolute;
{% localize off %}
left: {{ height }}mm;
{% endlocalize %}
top: 2mm;
}

{% endblock style %}

{% block content %}

{% trans 'QR Code' %}

{{ part.full_name }}

{% endblock content %}`

3.Print and Download PDF file;
4.See None Ch Text。

Relevant log output

None.
@zly20129 zly20129 added question This is a question setup Relates to the InvenTree setup / installation process triage:not-checked Item was not checked by the core team labels Jul 25, 2024
@zly20129
Copy link
Author

@matmair Please help me! ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question setup Relates to the InvenTree setup / installation process triage:not-checked Item was not checked by the core team
Projects
None yet
Development

No branches or pull requests

1 participant