Previous Next
185
SECTION 3.10 File Specifications
An embedded file stream can be included in a PDF document in the following
ways:
• Any file specification dictionary in the document may have an EF entry that
specifies an embedded file stream. The stream data must still be associated with
a location in the file system. In particular, this method is used for file attach-
ment annotations (see “File Attachment Annotations” on page 637), which as-
sociate the embedded file with a location on a page in the document.
• Embedded file streams can be associated with the document as a whole
through the EmbeddedFiles entry (PDF 1.4) in the PDF document’s name dic-
tionary (see Section 3.6.3, “Name Dictionary”). The associated name tree maps
name strings to file specifications that refer to embedded file streams through
their EF entries. (See implementation note 45 in Appendix H.)
Note: Beginning with PDF 1.6, the Desc entry of the file specification dictionary
(see Table 3.41) can be used to provide a textual description of the embedded file,
which can be displayed in the user interface of a viewer application. Previously, it
was necessary to identify document-level embedded files by the name string pro-
vided in the name dictionary associated with an embedded file stream in much
the same way that the JavaScript name tree associates name strings with docu-
ment-level JavaScript actions (see “JavaScript Actions” on page 709).
The stream dictionary describing an embedded file contains the standard entries
for any stream, such as Length and Filter (see Table 3.4 on page 62), as well as the
additional entries shown in Table 3.42.
TABLE 3.42 Additional entries in an embedded file stream dictionary
KEY TYPE VALUE
Type name (Optional) The type of PDF object that this dictionary describes; if present,
must be EmbeddedFile for an embedded file stream.
Subtype name (Optional) The subtype of the embedded file. The value of this entry must be
a first-class name, as defined in Appendix E. Names without a registered pre-
fix must conform to the MIME media type names defined in Internet RFC
2046, Multipurpose Internet Mail Extensions (MIME), Part Two: Media Types
(see the Bibliography), with the provision that characters not allowed in
names must use the 2-character hexadecimal code format described in Sec-
tion 3.2.4, “Name Objects.”
Params dictionary (Optional) An embedded file parameter dictionary containing additional, file-
specific information (see Table 3.43).
Previous Next