Help

1

Barcode not scanned (Code128) V 11 Quality Issue

Avatar
XC

Hi,

I use Version 11 Community, barcode is generated but while print it in small (18mm) and try to scan it it's not scanned if there is any text in barcode like 003-ABC-012

if only numbers like '00312131322' it's scanned.

the problem not from barcode itself but about quality of image coming in Product Label PDF.


kindly advice if there's way to generate barcode to different type of images like SVG  instead of embedded it to PDF?

screen shot:

https://i.ibb.co/jbYnRWh/barcode.png


<?xml version="1.0"?>
<t t-name="product.report_simple_label">
<div class="col-xs-4" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height:122px;" class="table">
<thead>
<tr style="width: 3in;">
<td style="border: 2px solid black;width: 2.63in;" colspan="2" class="col-xs-8 danger">
<t t-if="product.default_code">
[<strong t-field="product.default_code"/>]
</t>
<strong t-field="product.name"/>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td style="border: 2px solid black;text-align: center; vertical-align: middle;" class="col-xs-5">
<img t-if="product.barcode and len(product.barcode) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
<img t-elif="product.barcode and len(product.barcode) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
<img t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
<span t-field="product.barcode"/>
</td>
Avatar
Discard