How to hide text under QR Code image

chanikya
Tera Guru

Hi,

i would like to hide text under QR Code image

1.can i hide text under barcode image????   

2.Can i change QR code type to BAR Code type (||||) format??

find_real_file.png

If you please check it in my PDI, if you are with that

UI Action: Show Barcode   ,  UI Script:prototype-barcode       UI Page: barcode_gen

https://dev64572.service-now.com,

Test  /  123

 

 

Thanks.

1 ACCEPTED SOLUTION

David Ramirez
Kilo Guru

Hi!

 

Based on the documentation of the plugin you are using, you need to configure the type of barcode you wish to use on the UI Page client script along with settings such as bar size, color, positioning and whether you wish to see the text under the barcode.

 

the correct line would be something like this:

$("bcTarget").barcode( $('mydata').value, "code128",{"barWidth":1, "barHeight":50, "showHRI":false});

 

Please note that not all barcode readers can read all barcode standards, and some of them are numeric-only, try to experiment with the actual barcode readers you intend to use.

 

To see the full set of settings:

http://barcode-coder.com/en/barcode-jquery-plugin-201.html

 

To experiment with how you wish your barcode to look like:

http://barcode-coder.com/en/barcode-online-generator-2.html

 

I took the liberty to implement this in your test instance with the original setting commented out

 

Regards,

 

David

View solution in original post

7 REPLIES 7

David Ramirez
Kilo Guru

Hi!

 

Based on the documentation of the plugin you are using, you need to configure the type of barcode you wish to use on the UI Page client script along with settings such as bar size, color, positioning and whether you wish to see the text under the barcode.

 

the correct line would be something like this:

$("bcTarget").barcode( $('mydata').value, "code128",{"barWidth":1, "barHeight":50, "showHRI":false});

 

Please note that not all barcode readers can read all barcode standards, and some of them are numeric-only, try to experiment with the actual barcode readers you intend to use.

 

To see the full set of settings:

http://barcode-coder.com/en/barcode-jquery-plugin-201.html

 

To experiment with how you wish your barcode to look like:

http://barcode-coder.com/en/barcode-online-generator-2.html

 

I took the liberty to implement this in your test instance with the original setting commented out

 

Regards,

 

David

Hi David,

You have done wonderful thing here..

Thanks for your help..

 

David !, as of now when i scan barcode it is displaying Serial_number only,...is it possible to display 3 fields of information Asset_tag, manufacture, serial-number  when code will be  scan ??

Yes, that should be possible, you need to select the data you wish to encode in the barcode directly from the UI Action, currently, it only sends serial number but you could concatenate multiple fields.

thanks for your reply.

 

here is my ui-action, is it right way??

 

function generateBar() {
var w = new GlideDialogWindow('barcode_gen');
w.setTitle('Barcode Information');
w.setPreference('sysparm_data', g_form.getValue('serial_number'));

w.setPreference('sysparm_data', g_form.getValue('asset_tag'));

w.setPreference('sysparm_data', g_form.getValue('manufacture'));
w.render();
}