Skip to main content
Alex Doubts
Known Participant
March 25, 2022
Question

How to encode data from few text fields to QR Barcode field. ?

  • March 25, 2022
  • 2 replies
  • 635 views

I am embedding data from few text fileds to barcode field. I am using Adobe Acrobat pro.

I want to encode the data embedded in the barcode field. 

Awaiting a respone on this asap.

My code is s below:

var F32 = "F32~" + this.getField("txtChargeCode").value;

var F33 = "F33~" + this.getField("txtName").value;

var dSep="|';

 var Result = F32 + dSep + F33 ;

this.getField("Barcode").value = Result.toUpperCase() + '\r\n';

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
March 27, 2022

I moved your question to the Acrobat forum, first of all.

 

Are you using an actual Barcode field, or a text field with a barcode font?

If the latter, it depends on that font's encoding options.

If the former, I would recommend you use the built-in option to calculate the field's value, and then examine the code it generates and adapt it to your specific needs. Just remember this won't work when used in Reader!

Alex Doubts
Known Participant
March 25, 2022

I want to encode the form field values embedded to the barcode field via Adobr Javascript. I am developing in Adobe Acrobat Pro.

I am able to pass data to the barcode field in clear text with below code. But I need to encode the same. 

Please provide a solution for it asap

My code is as below

var F02 = "F02~" + this.getField("txtAmount").value;

var F03 = "F03~" + this.getField("txtChargeCode").value;

vardSep='||';

var Result = F02
+ dSep + F03

this.getField("Barcode").value = Result.toUpperCase() + '\r\n';