Skip to content

How to make custom labels support Chinese printing? #7735

Closed

Description

@zly20129

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.

Activity

  1. added
    question
    setup
    triage:not-checked
    on Jul 25, 2024
  2. zly20129 commented on Jul 25, 2024

    @zly20129
    Author

    @matmair Please help me! ^_^

  3. removed
    triage:not-checked
    on Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionsetup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions