Athento allows the generation of barcode labels. These codes can be printed and pasted on the physical documentation as stickers, so that a document (physical object or package) can be linked to its digital record.
In the following article we will see how to do this, step by step.
1. Set up the labels
The stickers will be generated in a PDF file. This PDF file will be the one sent to the label printer.
From the advanced administration in Pylabel > Label configs you configure the PDF file that will contain the labels. This file can contain a single barcode or several barcodes.
To save your label configuration, create a new "Label config" .
This is the configuration of the label that will contain the barcode.
Here you must configure the following data:
- Author: Author of the "Label config" object.
- Page width: Width of the document.
- Page height: Height of the document.
- Page margin top: Top margin of the document.
- Page margin left: Margin on the left side of the document.
- Page margin right: Margin of the right side of the document.
- Page margin bottom: Bottom margin of the document.
- Page rows: Rows into which the document will be divided.
- Page columns: Columns into which the document will be divided.
- Column gap: Separation between columns.
- Row gap: Separation between rows.
- Label width: Width of the label.
- Label height: Height of the label.
- Font label: Font used for the text that can be included next to the barcode.
- Label font size: Size of the text that can be included next to the barcode.
- Padding top: Top margin of the label.
- Padding left: Margin of the left side of the label.
- Padding right: Margin on the right side of the label.
- Label gap: Separation between labels.
- Template: Defines the content of the label to be painted.
-
- To paint a barcode you have to place it as a template:
-
[{"Code128": {"value": "<valor para el código de barras>"}}]
-
- If you also want to add information next to the barcode (visible text), you must include the key "labels" in the template definition, and include as many labels as you want, with "{"value": "<value of label x>"}" in the list of labels:
-
[{"Code128": {"value": "<valor para el código de barras>", "labels": [{"value": "<valor de la etiqueta 1>"}, {"value": "<valor de la etiqueta 2>"}]}}]
-
- The value of a field can also be defined as the value of the barcode or a label, making use of:
-
[{"Code128": {"value": "{{ fil.gmv('<name_del_metadato>') }}"}}]
-
- If you also want to change the size (in millimetres) of the barcode, you can change it using the following parameters:
-
[{"Code128": {"value": "{{ fil.gmv('<name_del_metadato>') }}", "width": 100, "height": 10}}]
-
- To paint a barcode you have to place it as a template:
2. Instalar la operación que genera los códigos 128
From space automations installs the operation:
op_generate_pdf_with_label_configuration
In the configuration of the operation you must indicate:
- Label configuration UUID: UUID of the "Label config" object created in the previous step.
- Number of copies: Number of copies of each label in the document.
3. Test from a document or record
After this configuration you can use this functionality. Simply go to a document or record and launch the operation to generate the PDF with the barcode.
For the example shown, a barcode with 2 labels has been configured, where both the content of the barcode and the text of both labels are obtained from metadata values of the document.
Comments
0 comments
Please sign in to leave a comment.