How to make custom labels support Chinese printing? #7735
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
Deployment Method
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:
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 %}
{% endblock content %}`
3.Print and Download PDF file;
4.See None Ch Text。
Relevant log output
The text was updated successfully, but these errors were encountered: