Previous Next
716
CHAPTER 8 Interactive Features
KEY TYPE VALUE
JavaScript dictionary (Optional; PDF 1.4) A JavaScript dictionary (see Table 8.95) defin-
ing document-level JavaScript scripts.
Embedded FDF files specified in the FDF dictionary’s EmbeddedFDFs entry may
optionally be encrypted. Besides the usual entries for an embedded file stream,
the stream dictionary representing such an encrypted FDF file must contain the
additional entry shown in Table 8.94 to identify the revision number of the FDF
encryption algorithm used to encrypt the file. Although the FDF encryption
mechanism is separate from the one for PDF file encryption described in Section
3.5, “Encryption,” revision 1 (the only one defined at the time of publication) uses
a similar RC4 encryption algorithm based on a 40-bit encryption key. The key is
computed by means of an MD5 hash, using a padded user-supplied password as
input. The computation is identical to steps 1 and 2 of Algorithm 3.2 on page 125;
the first 5 bytes of the result are the encryption key for the embedded FDF file.
TABLE 8.94 Additional entry in an embedded file stream dictionary for an encrypted
FDF file
KEY TYPE VALUE
EncryptionRevision integer (Required if the FDF file is encrypted; PDF 1.4) The revision number of the
FDF encryption algorithm used to encrypt the file. The only valid value
defined at the time of publication is 1.
The JavaScript entry in the FDF dictionary holds a JavaScript dictionary contain-
ing JavaScript scripts that are defined globally at the document level, rather than
associated with individual fields. The dictionary can contain scripts defining Jav-
aScript functions for use by other scripts in the document, as well as scripts to be
executed immediately before and after the FDF file is imported. Table 8.95 shows
the contents of this dictionary.
TABLE 8.95 Entries in the JavaScript dictionary
KEY TYPE VALUE
Before text string or (Optional) A text string or text stream containing a JavaScript script to be
text stream executed just before the FDF file is imported.
After text string or (Optional) A text string or text stream containing a JavaScript script to be
text stream executed just after the FDF file is imported.
Previous Next