Raising the bar

Frank Rem is the CEO of TallComponents, a leading provider of PDF oriented .NET components. He blogs at The PDF.

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:

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/01_-_RtB.png’ width=’475′ height=’210′
alt=’Acrobat’s Barcode Field alert.’>

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.

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/02_-_RtB.png’ width=’475′ height=’188′
alt=’Barcode Field Properties.’>

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

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/03_-_RtB.png’ width=’359′ height=’107′
alt=’Sample barcode.’>

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…

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/04_-_RtB.png’ width=’443′ height=’148′
alt=’Second barcode test.’>

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:

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/05_-_RtB.png’ width=’475′ height=’347′
alt=’Enable usage rights in Reader dialog.’>

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…

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/06_-_RtB.png’ width=’475′ height=’300′
alt=’Forms solution diagram.’>

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 LiveCycle 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.

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/07_-_RtB.png’ width=’475′ height=’158′
alt=’Paper forms barcode error.’>

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

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/08_-_RtB.png’ width=’475′ height=’146′
alt=’Paper forms barcode alert.’>

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:

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/09_-_RtB.png’ width=’475′ height=’351′
alt=’JavaScript for the calculate event.’>

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:

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/10_-_RtB.png’ width=’425′ height=’212′
alt=’PDF 417, QR Code, and Data Matrix Barcodes tip.’>

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?)

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/11_-_RtB.png’ width=’441′ height=’327′
alt=’Paper Forms Barcode tip.’>

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

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/12_-_RtB.png’ width=’412′ height=’167′
alt=’Paper Forms Barcode alert.’>

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:

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/13_-_RtB.png’ width=’241′ height=’199′
alt=’Barcode creation problem.’>

In LiveCycle designer, we choose File — Distribute Form… We choose ‘Manually collect responses in my email inbox’.

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/14_-_RtB.png’ width=’401′ height=’199′
alt=’Distribute Form dialog.’>

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…

src=’http://www.planetpdf.com/images/articles/Frank_Rem/RtB/15_-_RtB.png’ width=’279′ height=’227′
alt=’Blank barcode.’>

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?

You May Also Like

About the Author: Frank Rem

Leave a Reply