Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Abobe form with 2d barcode moves very slow in Adobe reader 8

Avatar

Former Community Member
I have created a 2d barcode form in designer 8 the form is a two page form with four barcodes to capture the data. The barcodes are on the second page. The form works fine if you open it in Adobe pro but slow down and you see the hour glass appearing once you move the mouse over any field when it is open in reader. I have saved the form with no embeded fonts. Is there a setting i am missing for the barcode set up.



Frustrated form designer.
19 Replies

Avatar

Former Community Member
If you are using the automatically generated code then this may be because each one of the barcodes is being updated after each modification by the user.



The default code is placed in the Calculate event. You may want to consider moving this to the pre-print event or use custom code that addresses each one of the fields directly using something along the lines of



this.rawValue = field.rawValue + "\t" + field2.rawValue + ...

Avatar

Former Community Member
I move the code from the calculate event to the Pre-print event but the barcode gets an error on it saying that the either you have not provide a script or the script is returning a null value.



Also where do you put this code at what line e.g

this.rawValue = field.rawValue + "\t" + field2.rawValue +

Avatar

Former Community Member
Hi George,



Based on what I saw from your form I would probably suggest doing the following:



Remove the automatically generated code from the Calculate events of each of the barcodes and replace with something like the following:



In each of the barcodes the value of "itself" is represented by "this.rawValue", roughly translated this means "my own value".



this.rawValue = Section2.Consideration.rawValue + "\t" + Section2.Parent.rawValue + "\t";



Of course, you would add the other values you require in the barcode.



Again, roughly translated the above code basically says: "my value is equal to the value of the Consideration field, a tab, and then the value of the Parent field, and another tab.



Another item you may want to reconsider is the field name values. Your field names are fairly long in some cases and including them in the barcode will reduce your capacity. In your "Section3" the field names may actually be longer than the data they hold.

Avatar

Former Community Member
How do I add the Fild name to be encode with the value in the barcode.



I am using Ascent Capture Adobe Barcode forms modules and it needs the fields to match the fields in Ascent capture.



The code below only send the value.

this.rawValue = Section2.Consideration.rawValue + "\t" + Section2.Parent.rawValue + "\t";

Avatar

Former Community Member
Hi George, if you want to add field names you can again, do it manually with script but again, I would suggest against it because of the space requirement in the barcode.



The BIG concern I have with your response is that it sounds like you are going to use the SAMPLE workflow agent that comes with the Adobe LiveCycle Barcoded Forms for Ascent Capture installation. This is a SAMPLE only and should not be put into a production environment without modification. If you look at the source code that comes with the sample (VB 6 code I believe) you will see there are absolutely no error capture routines, exceptions, or anything other than a straight data translation routine that populates AC index fields.



You really should not use this sample without making the required changes to it that you need for it to work reliably in your production environment. The sample works well as exactly that - a sample.

Avatar

Former Community Member
Kofax did send us some error checking to put in the code see below.

But when I tried it with the raw.Value without the field names it goes to one field that thats takes all the data. The workflow does not put the fields in the AC index fields because there are no field names.



What will I need to do to modify the code.

This is really getting very difficult and I have a deadline. Is it possible to do the connect web session as you suggested.



*****Kofax Fix that was sent*****************



The fix for this is to modify the sample Workflow Agent so that it ignores

these blank fields in the tab-delimited output:

For i = 0 To (iBarcodeFields - 1)

If FieldName(i) <> "" Then

Set oIndexField_Field = _

oIndexFieldsElement.FindChildElementByAttribute("IndexField",

"Name", FieldName(i))

If Not oIndexField_Field Is Nothing Then

oIndexField_Field.AttributeValue("Value") = FieldValue(i)

End If

End If

Next i

A check is added (the first If statement) to see if the current field name is

an empty string - If not then process the field.

Avatar

Former Community Member
What is causing the form to move so slow when you use the automatic scripting on the barcode than when you use the custom scripting.

Because the collection sets seems a nice tool to use. I did not plan on doing much coding that why I tried ver 8 to assign to fields to diferent barcodes.

Avatar

Former Community Member
How do i add the fields names to the barcode manually using the script that i used to add the field values.

Avatar

Former Community Member
If you are going to use the sample module (or a modified version) then it will be expecting the following:



- The field names separated by the tab character

- A carriage return / line feed

- The data associated with the field names separated by the tab character



So the JavaScript code within the Calculate event of the barcode would look something like this:



this.rawValue =

"fieldname1" + "\t" + "fieldname2" + "\t" + "fieldname3" + "\r" +

fieldname1.rawValue + "\t" + fieldname2.rawValue + "\t" + fieldname3.rawValue;



Just be sure to use a "\r" and not a "\t" to separate the field names from the associated data. JavaScript ignores white space so you can space out your code to match what you're encoding in the barcode

Avatar

Former Community Member
If you do have additional scripting questions or barcoded forms questions, feel free to join me on Monday September 24th at 1:00pm Eastern in this Acrobat Connect room: http://my.adobe.acrobat.com/barcodedforms/



Dial-in information will be provided once you enter the Connect room.



(Anyone is free to join this impromptu session).



Lee.

Avatar

Former Community Member
I am getting the word "NULL" appearing in emplty fields not filled out on the form when the 2D Barcode Forms is decoded in Ascent Capture 7 using the Adobe 2D Bsrcode Acsent Capture module. This happens when I used the custom scripting instead of the automatic codeding.



eg of customing scripting used.



this.rawValue =

"fieldname1" + "\t" + "fieldname2" + "\t" + "fieldname3" + "\r" +

fieldname1.rawValue + "\t" + fieldname2.rawValue + "\t" + fieldname3.rawValue;



Do I need to put in some code to check for for empty strings or do i need to to check Kofax

Avatar

Former Community Member
Inside your custom script you will need to ensure that fields are not "null" before putting the data into your script. You can do this by checking the fields on the exit of the field or running through the fields prior to updating your barcode.



if(myfield.rawValue == null)

myfield.rawValue = "";

Avatar

Former Community Member
Exactly where do I put the code to run through the fields prior to updating the barcode

or for checking the fields on the exit of the field



if(myfield.rawValue == null)

myfield.rawValue = "";



example: I put it at the end of the custom script for the barcode. Is this right



this.rawValue =

"fieldname1" + "\t" + "fieldname2" + "\t" + "fieldname3" + "\r" +

fieldname1.rawValue + "\t" + fieldname2.rawValue + "\t" + fieldname3.rawValue;



if(fieldname1.rawValue == null)

fieldname1.rawValue = "";

Avatar

Former Community Member
Hi Geoff, no, update the field values before you put those field values into the barcode itself.

Avatar

Former Community Member
hI Lee



Colud you explain this update process. Exactly where tus this code go

Avatar

Former Community Member
Try this out: http://my.adobe.acrobat.com/nullornotnullbarcodesample/



Normally I would loop through the subform, but this may be easier for you to start with.

Avatar

Former Community Member
Hi Lee can i save this form to see the code in the background

Avatar

Former Community Member
Click on the save icon on the top left hand corner of your browser or press <ctrl-s> to save locally.

Avatar

Former Community Member
Hi Lee



Thanks



It seem my computer was not allowing me to save so i restarted and saved the file. I now understand what is taking place and wa able to fixed my form.



Thanks a million.