Archive for September, 2007

OpenSource.org PDF Forms

Tuesday, September 25th, 2007

I recently downloaded OpenOffice.org for my Mac and Windows machines. Perhaps many of you have been working with OpenOffice much longer, but this is a report of my initial flirtation with the programs and I wanted to see what kinds of PDF related things I could do with OpenOffice.org Writer. Particularly in the area of creating PDF forms.

I’m a little late with my first look at OpenOffice since people like Carl Young here on Acrobat Users reported on using OpenOffice for forms design back in April. Take a look at Carl’s posts OpenOffice as an Acrobat Form Design Tool and More on OpenOffice as a Form Design Tool.

Admittedly I have much to learn about the program, so perhaps anyone passing by this blog post can help me out with adding your impressions to working with OpenOffice.org Writer and exporting to PDF.

For those who don’t know, OpenOffice applications export directly to PDF. OpenOffice.org Writer also supports creating live form fields and exporting to PDF. For a free downloadable application, you’ll find many impressive features in the program.

Designing a Form

The design atmosphere in Writer emulates a similar interface to Adobe LiveCycle Designer more than it does with Adobe Acrobat. If you’re familiar with creating forms in Designer, then poking around in OpenOffice should be much easier for you.

In the design arena, I found some interesting tools and features in Writer. I personally like to design forms in Adobe InDesign just for the sheer unlimited design potential that InDesign offers. In my opinion the Table features in InDesign are unsurpassed by any other application I’m familiar with. Not to mention other kinds of design elements you can add only in InDesign. Take a look at Figure 1 as an example. There’s no way I could create the same look in any program but InDesign.

fig02.gif

Figure 1
Download this form(519K)

In OpenOffice however I found some features not supported in InDesign. My impression is that, overall, OpenOffice is a little clumsier laying out a form than InDesign as Carl attests in his articles, but OpenOffice does have some very nice features not found in InDesign. As an example the Formula command in the Table menu enables you to add formulas to individual cells. I find this feature very nice when designing a form. InDesign hasn’t quite evolved to being a design application for PDF forms so obviously as yet, we wouldn’t expect InDesign to support formulas in cells and formatting cells for data.

The clumsiness I find is no doubt, in part, due to my own limitations in knowing the program well. I guess it’s hard to get away from enjoying the freedom that a program like InDesign offers you where you can plunk down any text or graphic anywhere on the page and freely drag objects around. I’m more of a non-structured form designer and think about layout as I’m creating a form rather than plan it all out ahead of time. With OpenOffice similar to LiveCycle Designer you are restricted to working in a much more structured environment. Placement of tables, text, and objects on a new layout are fixed to positions and I had a devil of a time trying to move things around the page.

Exporting to PDF

Without delving into the complex areas of using subforms and many more advanced features that OpenOffice.org Writer offers you, I created a simple form using the Table features and exported to PDF. I really wanted to see if those form fields are live in Acrobat and if it all works as I designed the form. Unfortunately, I just didn’t spend enough time trying to figure out getting the formula right for adding a column of numbers. Again, this is my limitation in using the application. I believe it does hold a lot of promise for the skilled form designer familiar with the program.

One discovery I found that I think is very important for those who may use OpenOffice for creating PDF forms, is that everything was fine in Acrobat for making modifications to my form. I used Acrobat to calculate a column of fields and saved the file. No problem here. However, when I chose Save As and rewrote the file, the result was a garbled mess as you can see in Figure 2. I found this anomaly equal on both Windows and the Macintosh.

fig01.jpg
Figure 2

There are some font issues going on with OpenOffice that I haven’t figured out yet. The one thing you need to be certain about if you decide to create some forms in OpenOffice is to be certain to check your work and make sure every aspect of the form is properly designed and functional.

I’m with Carl when he raised the question related to the flexibility of using XML type forms in Acrobat. An Adobe Live Cycle Designer form can’t be optimized with the PDF Optimizer in Acrobat, you can’t embed an index file, you can’t add headers and footers/watermarks and backgrounds, and you can’t add any comments or markups. You can’t insert LiveCycle Designer forms into a PDF document, edit initial views, nor add links or buttons for interactivity. You can add Designer forms to a PDF Package, but that’s about the only thing you can do in Acrobat related to any kind of editing. And, of course the most important issue is that you can’t edit a single form field in Acrobat.

On the other hand, forms created with OpenSource can take advantage of all the editing features you have with other PDF documents. You can do all the above, edit text, place images, and just about anything else Acrobat has to offer.

All in all I haven’t seen enough in OpenOffice to suggest to anyone that you use the program exclusively for PDF forms creation. There may be some benefits for using OpenOffice as a design tool, but adding the polish on your form is much better handled in Acrobat. Perhaps it could be a great companion product to Acrobat when it matures, but I don’t see Open Office completely replacing Acrobat or LiveCylce Designer.

I’d be interested in knowing your thoughts on using OpenOffice to create PDF forms.

ted

Download the form. (180K)

Simplifying Form Field Duplications

Friday, September 14th, 2007

I’ve been gearing up for the Acrobat Central Conference being held in Council Bluffs, IA on October 23 and 24 for several weeks now. I needed to do an overhaul on all my demo files, so it’s taken me several weeks to prepare for my sessions and workshops.

Of all the tips and techniques I use in my upcoming speaker sessions, my favorite is simplifying field duplication on Acrobat forms. I thought I’d give a preview here on Acrobat Users for those who can’t make the conference.

Let’s take a look at the form shown in Figure 1. It’s a rather simple PDF form with not many fields and it wouldn’t take much time to manually create the fields on this form. However, we can cut our time down a little by using the method described below. On this form, I’ve already created some fields for the identifying information at the top of the form as you can see in Figure 1.

figure01.jpg
Figure 1

Notice under Emergency Contact Info you find an identical set of fields as the fields shown in Figure 1. To speed up my work in Acrobat and make it a little easier to create my fields, I’ll just duplicate the fields in the top section and add the duplicates to the bottom portion of my form.

But wait you say… the fields need unique names in order to accept unique data. And, of course, you’re correct. So our task is to copy the existing fields and paste in fields with different names. Here’s how we do it:

    1. Open the Fields panel (you can choose View > Navigation Panels > Fields or open a context menu on a Navigation panel icon such as the Bookmarks icon and choose Fields from the menu)

    2. When the Fields panel opens, this particular form shows me two field names. The employee field name is a hierarchical name. My actual fields on the form are employee.first, employee.last, employee.address, and so on. If I rename the parent name, all my fields will keep the same child name while taking on the new parent name. In this example, I’ll use emergency for the root name so my fields will hence take on names such as emergency.first, emergency.last, emergency.address and so on.

    To rename the fields, open a context menu on the name you want to rename in the Fields panel and choose Rename field as shown in Figure 2. Type a new name and all the fields with the same parent name are changed.

    figure02.jpg
    Figure 2

    3. Copy the fields. Use the Select Object tool and select all fields you want to copy, then choose Edit > Copy or press Command/Ctrl + C.

    4. Revert the file. We just temporarily changed the field names in this file. We still need the original field names on our form while adding all the emergency field names. The original names are on the original file and the new names are on the Clipboard. Choose File > Revert and you get back the original unedited document.

    5. Paste the new fields. Once again, on the Clipboard are all the renamed fields. Choose Edit > Paste or press Command/Ctrl + V and the fields with the new parent names are pasted into the document.

    One word of caution: be sure to have the Select Object tool active when you paste fields into a PDF document. You can easily click and drag the selected fields around the document page. If the Hand tool is selected when you paste the fields and you click the Select Object tool, you loose the field selections. This could make it difficult to select the new fields scattered around the existing fields you don’t want moved. Don’t bother locking the fields. You can still copy and paste locked fields.

    6. Click and drag the fields to position. In Figure 3 you can see my final result. The employee fields are at the top of the form and the emergency fields have been moved to position at the bottom of the form. The fields have identical attributes for the common fields such as formatting for phone numbers and a Combo box for choosing the state name.

    figure03.jpg

    Figure 3

Download the Sample Form. File size is: 362K

Let’s take a look at another example and a little twist using a similar method. In Figure 4 you see a multi-page form with fields created on page 2. Following this page I have 3 more pages requiring the same fields in the same locations. If these were all user input fields with no calculations, I could use the same method described above. However, there are a number of JavaScripts and field calculations on this form. My needs are to not only rename the fields for the other pages, but also edit the JavaScripts. Once again, I was certain to use hierarchical names. The field names for Budapest all begin with b. I also have a form for Chengdu, Sweden, and Hawaii. Therefore, I’ll want my parent names for these pages to be c, s, and h respectively.

figure04.jpg

I wrote an article describing this method stressing the importance for using hierarchical names. You can find my Field-naming conventions article here on Acrobat Users. Some of what follows is a repeat of a similar method, but here I add a little more for why you might choose to create a temporary work file.

Here’s how to tackle this job:

    1. Create a blank new page. Choose File > Create PDF > From Blank Page. We need to create a temporary work file to perform the following steps. You can learn more about creating blank new pages from Donna Baker’s nice article for Starting fresh: Creating a new PDF file.

    When you create a blank new page, Acrobat assumes you want the page used for a memo or note. The new page is fine for adding text as pointed out by Donna in her article. But, we’re using our temporary file for form fields and we don’t have any need for the text box or the fonts loaded when the new page is created.

    2. Save the blank page. Choose File > Save As and save the blank page. Close the file. When you save the file, you eliminate the annoying text box.

    3. Reopen the blank page. Just open the File menu and you’ll find your last saved file at the top of the Recent Files list.

    4. Copy the fields you want to rename and paste them into the new blank page.

    5. Rename the fields. Again we use a similar method for renaming the fields. Open the Fields panel and open a context menu on the parent name for the fields you want to change. Choose Rename field from the menu and type a new name. As I said earlier, I’m changing my b name to c and all the children for that name are renamed. I also have a name used as b.budapest. I’ll change that to c.chengdu and all my fields are named for the Chengdu page.

    6. The next step deviates from the first example. We need to take care of all the JavaScript calculations. To do so, I can edit all the scripts in my new blank page with my new fields. Choose Advanced > Document Processing > Edit All JavaScripts. The JavaScript Editor shown in Figure 5 opens. All I need to do is change all the occurrences of b to c and b.budapest to c.chengdu and the scripts will be calculated properly for the fields on this page. I have a few additional fixed values, and I’ll change those as well.

    figure05.jpg
    Figure 5

    7. Copy the new fields after editing and paste them on your form. To continue, I follow the same procedure for the remaining pages in my form.

You could avoid using a temporary work file, but the more JavaScripts you have in a document the more searching you’ll have to do to make the proper changes. By isolating the scripts in a temporary file, you’ll find it much easier to locate the field names you need to change.

Try practicing on the Sample PDF file and let me know if you have any problems. File size is 6MB.

ted