PDF In-Depth

Raising the bar

July 08, 2011

Advertisement
Advertisement
 

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:

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.

Barcode Field Properties.

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

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

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:

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

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.

Paper forms barcode error.

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

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:

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:

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

Paper Forms Barcode tip.

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

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:

Barcode creation problem.

In LiveCycle designer, we choose File -- Distribute Form... We choose "Manually collect responses in my email inbox".

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

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?

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Two Passwords Are Better Than One: The Low-Down On PDF Security

For people who don't spend their time looking at PDF files in text editors*, PDF security is a sometimes misunderstood beast.

For example, those document restrictions that PDF files sometimes have -- no Printing, Content Copying, Page Extraction, etc -- are essentially useless unless the PDF also has a User Password.

January 09, 2014
Platinum Sponsor



Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist 11

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.