Understanding Reader Extensions
As mentioned, some of the interactive and dynamic features in your forms won’t work in Reader until the form has been Reader extended. In this section, you’ll learn about the limitations of Reader and how to transcend these confines with Reader Extensions.
Understanding Adobe Reader Limitations
Although Reader is primarily used to read or view PDF files, you’ll often need your Reader users to do more to effectively participate in your smart form workflow. Fortunately, you can extend the features of Reader by applying Reader Extensions to your PDF forms. In this section, you’ll explore the following two files to understand and transcend Reader’s limitations.
- notReaderExtended.pdf: This file was created in Designer and saved as a dynamic XFA PDF.
- readerExtended.pdf: This is the same file created in Designer, but it was also Reader extended with LiveCycle Reader Extensions.
Saving data with the form
Believe it or not, Reader users won’t be able to save a copy of your PDF form with their data until the form has been extended. When a nonextended PDF is opened, Reader displays a message in the document message bar. If you open the notReaderExtended.pdf file in Reader 9 or above, you’ll see a purple document message bar with the following message: Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records.
Although it’s helpful to know this before filling in a complex form, it’s hardly in keeping with a smart form workflow to print out the form to retain the data. It’s usually best to store the information digitally; your Reader users will be able to do this after the form is extended. Look at the readerExtended.pdf file, and you’ll see a purple document message bar with the following message: Please fill out the following form. You can save data typed into this form. You’ll also need to Reader extend a form if you want to use Reader to import or export XML data into PDF forms at runtime.
Using digital signatures
Digital signatures play an important role in secure smart form workflows. Just think about the many times you have had to sign paper documents. Digital signatures will replace the tasks in your workflow that previously required a handwritten signature on paper. In many ways, digital signatures are more trustworthy than traditional signatures, and there are various ways that you can use them in your Designer forms.
When you open the notReaderExtended.pdf file in Reader 9 or later, the digital signature field is unresponsive. However, when you open the readerExtended.pdf file, you’re able to sign the document by clicking the digital signature field.
Connecting to data in real time
The two sample files you’ve been working with also contain a connection to a web service. However, you’ll notice that this web service call works only in the Reader extended file. Follow these steps to call a web service from that sample file:
- Open the readerExtended.pdf sample file in Adobe Reader 9 or later.
- Enter 1001 in the Enter ID field.
Click the Call Web Service button. This will call a web service at the SmartDoc data center to retrieve a record from a Microsoft SQL Server database. Depending on your security settings, you may see Acrobat Security Warning messages like the one in Figure 4.9. You’ll need to trust this document as explained in step 5 to bypass these messages.
Figure 4.9 The Acrobat Security Warning message.
- Deselect the “Remember this action for this site for all PDF documents” option, and click Allow.
- Click the Options drop-down list in the Acrobat document message bar, and select “Trust this document one time only.”
- Click No if you’re prompted to save changes.
Now that the security questions are answered, you can enter 1001 in the Enter ID field, and click the Call Web Service button.
The data will automatically flow into the form fields of the PDF. This happens because the form has been Reader extended and the fields are bound to the data connection.
If you try to repeat the preceding steps in Adobe Reader with the notReaderExtended.pdf file, nothing will happen when you click the Call Web Service button.
Submitting electronic forms
Some types of electronic form submission won’t work in Reader until the file has been extended. Reader enables you to submit XML data from a nonextended form, but if you want to submit the form and the data, the form must be Reader extended. Follow these steps with your sample files to see how this works:
- Open the readerExtended.pdf sample file in Adobe Reader 9 or later.
Click the Submit Form button. The Send Email dialog box appears (Figure 4.10).
Figure 4.10 The Send Email dialog box.
- If you have Microsoft Outlook, select Default Email Application, and click Continue. Acrobat passes this form to your Outlook program. Note that this functionality doesn’t work with all email programs.
The Outlook screen shows your email message with your attached PDF form (Figure 4.11).
Figure 4.11 An Outlook email message with an attached PDF form.
If you’re using Reader and you try to click Submit Form in the notReader Extended.pdf file, nothing will happen. Form submission isn’t supported in Reader until the form has been Reader extended. However, you can submit the XML data. Click the Submit Data button and you’ll be able to complete the process.
The Submit Data button will work with both files. This button will submit your form data as an XML email attachment. Reader supports XML data submission for both extended and nonextended forms.
You may sometimes need to integrate paper-based tasks in a digital workflow. Barcodes can help you do this. For instance, if you send an interactive PDF form to users and they fill it out with Reader, they may not necessarily submit the form to you electronically. For various reasons, your users may decide to print out the form and submit it via fax or traditional mail.
In these cases, barcodes can encode the users’ form data as they enter it into Reader. You saw an example of this at the end of Chapter 2, “Scripting and Advanced Techniques.” These barcodes on the paper forms can be scanned, and the data they contain will be automatically read into your back-end system. If you open the readerExtended.pdf file in Reader 9 or later, you’ll see the barcode in action. The code is wired to encode the data only in the Name field. As you make changes to this data, the visual appearance of the barcode changes. This barcode is an instance of Adobe’s Paper Forms barcode, which you can add to your forms with Designer. This two-dimensional barcode is read by a barcode scanner, which retrieves the data you entered in the Name field. You can encode most types of form data into a barcode.
Acrobat enables users to attach other files to a PDF. This capability is useful in cases when a user wants to include supporting documents with a form. These files appear in the Attachments panel, which is always available in Acrobat and active in Reader when a PDF has been extended. Follow these steps to see how to add attachments to PDF forms and files:
- To open the Attachments panel in Acrobat, select View > Show/Hide > Navigation Panes > Attachments. Alternatively, you can click the paperclip icon in the Navigation pane on the left of the main window.
Click the drop-down list and select Add Attachment (Figure 4.12, left). The Add Files dialog box will open.
Figure 4.12 The Attachments panel (left) and the Extended Features panel in Reader (right).
- Select the file you need to attach to your PDF form and click Open. Your attached file now displays in the Attachments panel.
You won’t see this option in Reader when you open the notReaderExtended.pdf file. However, when you open the readerExtended.pdf file, this feature is enabled. You can also open the Attachments panel in Reader by clicking the icon in the Extended Features panel that displays in Reader when a Reader Extended file is active (Figure 4.12, right).
Using the Comment and Markup tools
The Acrobat Comment and Markup tools aren’t normally a feature of Adobe Reader. However, these tools lie dormant in the program and can be activated when a Reader extended PDF form is opened. Remember, it must be a static XFA PDF in order for you to use these tools. You’ll Reader extend a static form in the next exercise.
Extending a PDF Form with Acrobat
Now that you’ve learned the benefits of Reader extending your form, it’s time to learn how to do so with a hands-on exercise. There are two tools you can use to extend a form:
- Adobe Acrobat will do a partial Reader extension of your PDF form.
- LiveCycle Reader Extensions will do a complete extension of your XFA PDF. LiveCycle Reader Extensions is a LiveCycle Server module that needs to be licensed from Adobe separately from Acrobat.
Partial Reader extension with Acrobat Professional
These steps allow you to Reader extend a form using Acrobat Professional:
- Open the changeOfBeneficiaryStatic.pdf form in Adobe Reader. Notice that the commenting tools in the upper right are grayed-out and inactive.
- Close the changeOfBeneficiaryStatic.pdf form in Adobe Reader.
- Open the changeOfBeneficiaryStatic.pdf form in Acrobat Professional.
Select File > Save As Other > Reader Extended PDF > Enable More Tools (includes form fill-in and save).
Acrobat displays a message box describing the features that will be available for this file when it’s opened in Reader (Figure 4.13).
Figure 4.13 Enabling Adobe Reader usage rights.
- Click Save Now to open the Save As dialog box.
Change the filename to changeOfBeneficiaryStatic_RE.pdf and click Save.
Your file is now Reader extended, and it supports the following features:
- Saving data with the form
- Using the Comment and Markup tools
- Submitting electronic forms
- Using digital signatures
- Open your new changeOfBeneficiaryStatic_RE.pdf in Adobe Reader. Notice that the commenting tools in the upper right are now active.
Although Reader extending with Acrobat Professional is good for many cases, you’ll have to extend your forms with LiveCycle Reader Extensions if you need Reader users to access any of the following functionality in your XFA PDFs:
- Connecting to data in real time
- Using barcodes
- Attaching files
Complete Reader extension with LiveCycle Reader Extensions
To completely Reader extend your PDF forms, you need to use LiveCycle Reader Extensions. Unlike the previous Acrobat method, Reader Extensions can extend files at design time and at runtime. If you have a license for this LiveCycle Server module, you can extend a file at design time by launching your browser and navigating to the Reader Extensions URL of your LiveCycle Server. The path will follow this format.
http://[Server Address]:[Port Number]/ReaderExtensions
After you log in with your username and password, the main screen appears (Figure 4.14). You can select your PDF file and your usage rights on this screen. After making your choices, click Apply to Reader extend your file.
Figure 4.14 The web interface for LiveCycle Reader Extensions. You need this software to enable Reader users to work with barcodes and embed file attachments.
Since this module runs as a LiveCycle service, you can call it at runtime from your LiveCycle, Java, or .NET programs. This is an ideal module to use at runtime to make sure all users of your form will realize its full functionality regardless of whether they are using Acrobat or the free Reader program. As you can see in Figure 4.14, you can even add a custom message that users will see when they open your Reader extended files.