Rasing the bar

6/30/2011 By Frank 0 comments

I wanted to have a QR barcode on a PDF form, and I wanted it to get dynamically updated with the value of another form field. Sounds reasonable I think. Does not sound hard either. Let’s have a look at some trial and error in Adobe Acrobat.

First step: I happily started Acrobat X and chose “Add Barcode Field”. It greeted me with the following message:

add-barcode-field.png

I just ignored this. I am not doing any paper forms processing, am I? I am just adding a barcode to an electronic form. So, I added the Barcode field, set its “Symbology” to “QR Code” and pointed to the field “Text2” for its value.

barcode-field.png

And sure enough, in Acrobat, when I type a value in the field named “Text2”, the barcode gets updated:

barcode-updated.png

I was quite pleased, assuming that things would be the same in Reader. This is just another field isn’t it? But then I tried it, and…

barcode-in-reader.png

Googling suggested that the document actually needs to be reader-enabled. So I went back to Acrobat X and chose Save As -> Reader Extended PDF -> Enable Additional Features. Again, we get a dialog box:

pop-up-pdf-barcode.png

Hmmm, it does not say anything about Barcodes. And indeed: after enabling Reader still does not update the barcodes. What now?

Maybe it was not such a good idea to ignore the Barcoded Paper Forms Solution message after all. I opened Acrobat help, and entered “barcode paper forms solution”. The first hit on the “Community Help” page, was “Adobe LiveCycle ES2 * Using paper forms barcodes”. This lead to some general story about using paper forms barcodes. No prices, no product info, and certainly no howto. Well, I found a nice picture…

nice-picture.png

And, at the end, there is the note “To make use of the paper forms barcode, your organization must have implemented LiveCycle Barcoded Forms”. Of course no link, just yet another term.

At this point I felt very reluctant to start searching again. Apparently all this was related to LiceCycle Designer. Notice that the article says AdobeLiveCycle Designer ES2. I have that as part of Acrobat Pro, so I started it up, opened the PDF and let it convert the document. Then it said this.

barcode-error.png

Fair enough, even though Acrobat apparently had no problems with this. So, I dragged the Barcode field a bit bigger:

barcode-increased.png

My Script? What script? I enabled the script editor and saw that there was some javascript associated with the “calculate” event. Well, commented-out code actually:

barcode-script.png

Right, so now I am supposed to rewrite this into some FormCalc expression? I think not! Back to square one. We create an empty form in LiveCycle designer, and we choose Insert – Barcodes – QRCode from the menu:

empty-form-insert-barcode.png

And as an award, we now have a read-only QR code on our form. There is nothing much we can do with that, except assigning some fixed value to it. Luckily the dialog box mentioned a “Paper Forms Barcode”. So we look in the menu again. Yes, there they are: Insert – Barcodes – Paper Forms Barcodes. Again a tip (isn’t this great?)

paper-forms-barcode.png

Of course I am going to ignore the talk about separate licenses. we get:

licensing.png

I create a new text box, as well as a new collection, and I add the text box to it. I leave this as an exercise to the reader… You will probably get warnings about exceeding the barcode capacity. Just specify a maximum numbers of characters for the text field. And again, this is not going to work out-of-the-box for Adobe Reader. At least the effect is consistent:

text-field.png

In LiveCycle designer, we choose File – Distribute Form... We choose “Manually collect responses in my email inbox”.

distribute-form.png

On the next screen, we choose the second option (save a local copy). Then we specify an email address, and finish the wizard. We now have a “distributed” variant of our form. It should have been enabled, I think.

And then….

aaargh.png

I now read somewhere on the web that I actually need LiveCycle RE (reader extensions) to enable dynamic barcodes in reader! I give up. Sigh. Why is it that Adobe treats barcodes so much different from other form fields? And why does this picture above even mention LiveCycle ES2?