Repository navigation
PDF20 Spec 13 Sounds
Part of: PDF20-Spec-13-Multimedia
Navigation: PDF20-Spec-13-Multimedia | PDF20-Spec-Index | PDF20-Spec-13-Movies
13.3 Sounds The features described in this subclause are deprecated with PDF 2.0. They are superseded by the general multimedia framework described in 13.2, "Multimedia". A sound object (PDF 1.2) shall be a stream containing sample values that define a sound to be played through the computer’s speakers. The Sound entry in a sound annotation or sound action dictionary (see "Table 188 — Additional entries specific to a sound annotation" and "Table 212 — Additional entries specific to a sound action") shall identify a sound object representing the sound to be played when the annotation is activated. Since a sound object is a stream, it may contain any of the standard entries common to all streams, as described in "Table 5 — Entries common to all stream dictionaries". In particular, if it contains an F (file specification) entry, the sound shall be defined in an external file. This sound file shall be selfdescribing, containing all information needed to render the sound; no additional information need be present in the PDF file. NOTE
The AIFF, AIFF-C (Mac OS), RIFF (.wav), and snd (.au) file formats are all self-describing.
If no F entry is present, the sound object itself shall contain the sample data and all other information needed to define the sound. “Table 305 — Additional entries specific to a sound object” shows the additional dictionary entries specific to a sound object. Table 305 — Additional entries specific to a sound object Key
Type
Value
Type
name
(Optional) The type of PDF object that this dictionary describes; if present, shall be Sound for a sound object.
R
number
(Required) The sampling rate, in samples per second.
C
integer
(Optional) The number of sound channels. Default value: 1.
B
integer
(Optional) The number of bits per sample value per channel. Default value: 8.
© ISO 2020 – All rights reserved
637
ISO 32000-2:2020(E)
Key
Type
Value
E
name
(Optional) The encoding format for the sample data: Raw
Unspecified or unsigned values in the range 0 to 2B - 1
Signed
Twos-complement values
muLaw
m-law–encoded samples
ALaw
A-law–encoded samples
Default value: Raw. CO
name
(Optional) The sound compression format used on the sample data. (This is separate from any stream compression specified by the sound object’s Filter entry; see "Table 5 — Entries common to all stream dictionaries" and 7.4, "Filters") If this entry is absent, sound compression shall not be used; the data contains sampled waveforms that shall be played at R samples per second per channel.
CP
(various)
(Optional) Optional parameters specific to the sound compression format used.
No standard values have been defined for the CO and CP entries. Sample values shall be stored in the stream with the most significant bits first (big-endian order for samples larger than 8 bits). Samples that are not a multiple of 8 bits shall be packed into consecutive bytes, starting at the most significant end. If a sample extends across a byte boundary, the most significant bits shall be placed in the first byte, followed by less significant bits in subsequent bytes. For dual-channel stereophonic sounds, the samples shall be stored in an interleaved format, with each sample value for the left (channel 1) preceding the corresponding sample for the right (channel 2). To maximise the portability of PDF documents containing embedded sounds, interactive PDF processors should support at least the following formats (assuming the platform has sufficient hardware and OS support to play sounds at all): R
8000, 11,025, or 22,050 samples per second
C
1 or 2 channels
B
8 or 16 bits per channel
E
Raw, Signed, or muLaw encoding
If the encoding (E) is Raw or Signed, R shall be 11,025 or 22,050 samples per channel. If the encoding is muLaw, R shall be 8000 samples per channel, C shall be 1 channel, and B shall be 8 bits per channel. Sound players shall convert between formats, downsample rates, and combine channels as necessary to render sound on the target platform.
Navigation: PDF20-Spec-13-Multimedia | PDF20-Spec-Index | PDF20-Spec-13-Movies