Repository navigation
PDF20 Spec 13 Alternate
Part of: PDF20-Spec-13-Multimedia
Navigation: PDF20-Spec-13-Movies | PDF20-Spec-Index | PDF20-Spec-13-3D
13.5 Alternate presentations The features described in this clause are deprecated with PDF 2.0. Beginning with PDF 1.4, a PDF document may contain alternate presentations, which specify alternative ways in which the document may be viewed. The optional AlternatePresentations entry (PDF 1.4) in a document’s name dictionary (see "Table 32 — Entries in the name dictionary") contains a name tree that maps name strings to the alternate presentations available for the document. Since PDF processors are not required to support alternate presentations, authors of documents containing alternate presentations should define the files such that something useful and meaningful 640 © ISO 2020 – All rights reserved
ISO 32000-2:2020(E)
can be displayed and printed. For example, if the document contains an alternate presentation slideshow of a sequence of photographs, the photographs should be viewable in a static form by viewers that are not capable of playing the slideshow. As of PDF 1.5, the only type of alternate presentation is a slideshow. Slideshows may be invoked by means of JavaScript actions (see 12.6.4.17, "ECMAScript actions") initiated by user action on an interactive form element (see 12.7, "Forms"). "Table 308 — Entries in a slideshow dictionary" shows the entries in a slideshow dictionary. Table 308 — Entries in a slideshow dictionary Key
Type
Value
Type
Name
(Required; PDF 1.4) The type of PDF object that this dictionary describes; shall be SlideShow for a slideshow dictionary.
Subtype
Name
(Required; PDF 1.4) The subtype of the PDF object that this dictionary describes; shall be Embedded for a slideshow dictionary.
Resources
name tree
(Required; PDF 1.4) A name tree that maps name strings to objects referenced by the alternate presentation. Even though PDF treats the strings in the name tree as strings without a specified encoding, the slideshow shall interpret them as UTF-8 encoded Unicode.
StartResource
byte string
(Required; PDF 1.4) A byte string that shall match one of the strings in the Resources entry. It shall define the root object for the slideshow presentation.
NOTE 1
The Resources name tree represents a virtual file system to the slideshow. It associates strings (“file names”) with PDF objects that represent resources used by the slideshow. For example, a root stream can reference a file name, which would be looked up in the Resources name tree, and the corresponding object would be loaded as the file. (This virtual file system is flat; that is, there is no way to reference subfolders.)
NOTE 2
Typically, images are stored in the document as image XObjects (see 8.9.5, "Image dictionaries"), thereby allowing them to be shared between the standard PDF representation and the slideshow. Other media objects are stored or embedded file streams (see 7.11.4, "Embedded file streams").
To allow PDF processors to verify content against their own supported features, all referenced objects shall include a Type entry in their dictionary, even when the Type entry is normally optional for a given object. EXAMPLE
The following example illustrates the use of alternate presentation slideshows.
1 0 obj <</Type /Catalog /Pages 2 0 R /Names 3 0 R …
endobj 3 0 obj <</AlternatePresentations 4 0 R>> endobj
© ISO 2020 – All rights reserved
%Indirect reference to name dictionary
%The name dictionary
641
ISO 32000-2:2020(E)
4 0 obj <</Names [(MySlideShow) 5 0 R]>> endobj
%The alternate presentations name tree
5 0 obj <</Type /SlideShow /Subtype /Embedded /Resources <</Names [(mysvg.svg) 31 0R (abc0001.jpg) 35 0 R (abc0002.jpg) 36 0 R (mysvg.js) 61 0 R (mymusic.mp3) 65 0 R ]
/StartResource (mysvg.svg)
endobj
%The slideshow definition
31 0 obj <</Type /Filespec /F (mysvg.svg) /EF <</F 32 0 R>>
endobj 32 0 obj <</Type /EmbeddedFile /Subtype /image#2Fsvg+xml /Length 72
stream
<!- Some SVG goes here -> endstream endobj
%The root object, which %points to an embedded file stream
%The embedded file stream
% … other objects not shown …
Navigation: PDF20-Spec-13-Movies | PDF20-Spec-Index | PDF20-Spec-13-3D