Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Include a barcode in an email... without the number below

salvdangelo
Level 5
Level 5

Hi,

Simple question: how may I insert a barcode number (es. Code 128) in an email source code without having the relative number below ?
Is it possible to improve the image quality (the default one is quite low)?


Salvatore

Vipul Raghav
Jean-Serge Biron
florentlb
Adobe Campaign

1 Accepted Solution
Jean-Serge_Biro
Correct answer by
Community Advisor
Community Advisor

So the problem is your html code:

Your image size displayed is: 280px (width) × 70px (height)

The height of 70 px is given by your barcode parameter inserted (/h70/). (Default value is 100 px.)

The scale value given is the default one (/s1/).

It is because you enforce the image width to be 280 pix.
So it generates an homothetic distorsion, by stretching it, perhaps not convenient for scanner reading, anyway, giving this blur aspect.

Anyway, with the distortion, the height is enforced to 128px, bypassing the h70 you defined.

I tried it without the width attribute, and the image seems far clearer.

The problem is that using scale x2 generates a pretty larger image, probably not convenient for your email delivery:

286 (w) x140 (h)

To my mind, the better would be to suppress this width attribute.

1332081_pastedImage_1.png

Regards
JS

View solution in original post

4 Replies
Jean-Serge_Biro
Community Advisor
Community Advisor

Hello Salvatore,

Regarding the image quality you get, please may you indicate the personalisation code you have inserted in your delivery?

(domain not useful, replace it with "serverdomain")

For instance for GS1-128 (formely EAN 128), using scale 1, height 100 pixels:

<img src="http://serverdomain/barcode/tEAN128/h100/s1/v<%= encodeURIComponent('1234567890123').replace(/%2F/gi,'/')%>/barcode.gif">

And if possible please also share the image result itself, not the email rendering itself.
I wonder if it is not your html template that doesn't let enough place for the image gif generated to be displayed at its default size.

I don't know if it exists a 2D barcode format without the relative number below.

I always used EAN 13 so far (or QR Code) with its below number.
And I think it is convenient as is, in case of scanner mistake, letting people type it manually.

Regards
J-Serge

salvdangelo
Level 5
Level 5

Hi Jean-Serge

I am using a 1D barcode, in particular EAN 128.

<img src="http://serverdomain/barcode/tEAN128/h70/s1/v<%= encodeURIComponent('' +  recipient.customerBarcodeNum  + '').replace(/%2F/gi,'/')%>/barcode.gif" width="280" style="margin:0px; padding:0px; display:inline;" border="0">

barcode CAMPAIGN.jpg

Jean-Serge_Biro
Correct answer by
Community Advisor
Community Advisor

So the problem is your html code:

Your image size displayed is: 280px (width) × 70px (height)

The height of 70 px is given by your barcode parameter inserted (/h70/). (Default value is 100 px.)

The scale value given is the default one (/s1/).

It is because you enforce the image width to be 280 pix.
So it generates an homothetic distorsion, by stretching it, perhaps not convenient for scanner reading, anyway, giving this blur aspect.

Anyway, with the distortion, the height is enforced to 128px, bypassing the h70 you defined.

I tried it without the width attribute, and the image seems far clearer.

The problem is that using scale x2 generates a pretty larger image, probably not convenient for your email delivery:

286 (w) x140 (h)

To my mind, the better would be to suppress this width attribute.

1332081_pastedImage_1.png

Regards
JS

View solution in original post

Jean-Serge_Biro
Community Advisor
Community Advisor

I also had a look on the barcode.jsp source code in the datakit folder on the server, and I find it would be risky to modify it to try to get out the relative number below.
...not to mention that any build update would probably override your change...

BR
JS