Chapter 9. Multimedia and 3D
Throughout PDF’s 20 years of existence, the world of multimedia has moved from simple sounds and animations to today’s interactive experiences in both 2D and 3D. PDF supports a variety of ways in which to incorporate these various types of media. This chapter will go into detail on the series of annotation types that enable the inclusion of multimedia and 3D content in PDF.
Simple Media
PDF 1.2 introduced the sound and movie annotation types, which moved PDF beyond its original vision of “static 2D electronic paper” into the fully fledged rich document format that it is today.
Sound Annotations
The sound annotation was originally added to PDF to provide an analog to the text annotation, except that instead of a text note, it would contain sound recorded from the computer’s microphone or imported from a file that would play upon the activation of the annotation.
The annotation dictionary for a sound annotation consists of a Subtype
of sound, the stream of sound data as the value of the Sound
key, as well as any common annotation information required (see Example 9-1). Additionally, a Name
key whose value is either Speaker
or Mic
may be present; this declares a predefined icon to be used when an appearance stream is not present.
The stream data for the sound should be in a common, self-describing format such as AIFF, RIFF/wav, or snd/au, and the sampling rate of the data needs to be included (as the value of the R
key) in the stream dictionary. Additional information ...
Get Developing with PDF now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.