跳转至

13.2 多媒体

13.2 Multimedia

13.2.1 概述

13.2.1 General

PDF 1.5 引入了一套完整的语言构造,以实现以下功能:

  • PDF 文件中可嵌入任意类型的媒体。
  • 嵌入的媒体以及 PDF 文件外部引用的媒体可由各种播放软件进行播放。(在某些情况下,播放软件可能就是符合规范的阅读器本身。)

注 1

术语 播放(playing)适用于各种类型的媒体,不仅限于音频或视频。例如,它也可用于静态图像,如 JPEG。

  • 媒体对象可以具有多个呈现方式(rendition),可在播放时根据带宽等因素进行选择。
  • 文档作者可以控制播放时的需求,例如应使用哪个播放器软件播放特定的媒体对象。
  • 媒体对象可通过多种方式播放,例如在页面上的特定区域或浮动窗口中播放。
  • 未来对媒体构造的扩展可由当前符合规范的阅读器以适当方式处理。作者可以控制旧版符合规范的阅读器如何处理未来的扩展。
  • 文档作者可以根据无障碍需求调整多媒体的使用方式。
  • 在线媒体对象即使体积庞大,也可高效播放。

以下列表总结了多媒体功能,并指出了每项功能的讨论章节:

  • 13.2.2,“可行性(Viability)”描述了确定媒体对象是否适合在特定系统上播放的规则。
  • 呈现动作(Rendition Actions)(参见 12.6.4.13,“呈现动作”)应用于启动多媒体内容的播放。
  • 呈现动作 关联一个 屏幕注释(Screen Annotation)(参见 12.5.6.18,“屏幕注释”)与一个 呈现方式(Rendition)(参见 13.2.3,“呈现方式”)。
  • 呈现方式 有两种类型:
  • 媒体呈现方式(Media Renditions)(参见 13.2.3.2,“媒体呈现方式”),定义了要播放的媒体的特性。
  • 选择器呈现方式(Selector Renditions)(参见 13.2.3.3,“选择器呈现方式”),用于在一组 媒体呈现方式 中选择播放哪一个。
  • 媒体呈现方式 包含以下条目:
  • 播放内容(参见 13.2.4,“媒体剪辑对象(Media Clip Objects)”)。
  • 播放方式(参见 13.2.5,“媒体播放参数(Media Play Parameters)”)。
  • 播放位置(参见 13.2.6,“媒体屏幕参数(Media Screen Parameters)”)。
  • 13.2.7,“其他多媒体对象”描述了被前述主要对象引用的若干 PDF 对象。

注 2

以下子章节描述的部分功能参考了 同步多媒体集成语言(SMIL 2.0) 标准中的对应元素(参见 参考文献)。

PDF 1.5 introduces a comprehensive set of language constructs to enable the following capabilities:

  • Arbitrary media types may be embedded in PDF files.
  • Embedded media, as well as referenced media outside a PDF file, may be played with a variety of player software. (In some situations, the player software may be the conforming reader itself.)

NOTE 1

The term playing is used with a wide variety of media, and is not restricted to audio or video. For example, it may be applied to static images such as JPEGs.

  • Media objects may have multiple renditions, which may be chosen at play-time based on considerations such as available bandwidth.
  • Document authors may control play-time requirements, such as which player software should be used to play a given media object.
  • Media objects may be played in various ways; for example, in a floating window as well as in a region on a page.
  • Future extensions to the media constructs may be handled in an appropriate manner by current conforming readers. Authors may control how old conforming readers treat future extensions.
  • Document authors may adapt the use of multimedia to accessibility requirements.
  • On-line media objects may be played efficiently, even when very large.

The following list summarizes the multimedia features and indicates where each feature is discussed:

  • 13.2.2, “Viability,” describes the rules for determining when media objects are suitable for playing on a particular system.
  • Rendition actions (see 12.6.4.13, “Rendition Actions”) shall be used to begin the playing of multimedia content.
  • A rendition action associates a screen annotation (see 12.5.6.18, “Screen Annotations”) with a rendition (see 13.2.3, “Renditions”).
  • Renditions are of two varieties: media renditions (see 13.2.3.2, “Media Renditions”) that define the characteristics of the media to be played, and selector renditions (see 13.2.3.3, “Selector Renditions”) that enables choosing which of a set of media renditions should be played.
  • Media renditions contain entries that specify what should be played (see 13.2.4, “Media Clip Objects”), how it should be played (see 13.2.5, “Media Play Parameters”), and where it should be played (see 13.2.6, “Media Screen Parameters”).
  • 13.2.7, “Other Multimedia Objects,” describes several PDF objects that are referenced by the preceding major objects.

NOTE 2

Some of the features described in the following sub-clauses have references to corresponding elements in the Synchronized Multimedia Integration Language (SMIL 2.0) standard (see the Bibliography).

13.2.2 可行性

13.2.2 Viability

在播放多媒体内容时,符合规范的阅读器通常需要做出决策,例如使用哪种播放器软件以及调整哪些选项(如音量和播放时长)。

在做出这些决策时,阅读器需要确定所使用对象的 可行性(viability)。如果一个对象被认为是 不可行的(non-viable),则不应播放该媒体。如果对象是可行的,则应播放媒体,但可能无法达到最佳播放条件。

多媒体对象字典中有多个条目会影响可行性。特别是,一些对象字典定义了两个条目,这两个条目将选项划分为两类:

  • MH(“必须遵守”(must honour)):必须遵守此条目指定的选项,否则包含该条目的对象应被视为 不可行
  • BE(“尽力而为”(best effort)):应尽量遵守此条目指定的选项;但如果无法满足,包含该条目的对象仍然被视为 可行

MHBE 都是字典,并且它们的定义条目应当相同。在允许包含这些条目的任何字典中,MHBE 可以同时存在,也可以只存在其中一个,或者两者都不存在。

示例

媒体播放参数字典(Media Play Parameters Dictionary)(参见 表 279)允许通过 MHBE 字典中的 V 条目(参见 表 280)设置播放音量。

如果指定的音量无法满足,则:

  • 如果 V 位于 MH 字典中,则该对象应被视为 不可行,播放不应进行。
  • 如果 V 仅位于 BE 字典中(而不在 MH 字典中),则播放仍应进行,播放软件会尽力满足指定的音量要求。

通过这种机制,作者可以指定 最低要求(MH)首选选项(BE)。此外,还可以指定未来添加到多媒体字典中的新条目应如何被旧版符合规范的阅读器解释:

  • 如果阅读器无法识别 MH 字典中的某个条目,则该对象应被视为 不可行
  • 如果阅读器无法识别 BE 字典中的某个条目,则该条目应被忽略,不影响可行性。
  • 除非另有说明,如果 MH 字典包含无法识别的键,或某个已知键的值无法识别,则该对象应被视为 不可行

MHBE 字典的规则

MHBE 字典的行为与其他 PDF 字典略有不同,适用以下规则:

  • 如果一个条目是 必需的,那么只要它存在于 MHBE 字典中的任意一个,要求就被视为满足。
  • 如果一个条目是 可选的,且在 MHBE 字典中均不存在,则该条目应被视为存在于 BE 字典中,并使用其默认值(如果有定义)。
  • 如果 MHBE 字典中都存在相同的条目,则除非另有说明,否则应忽略 BE 字典中的该条目。
  • 如果 MHBE 字典中的条目值是 字典数组,则在确定可行性时应将其视为 原子单元(atomic unit)。也就是说,必须满足字典或数组中的所有条目,该对象才能被视为 可行

在评估条目是否可满足时,不要求逐个独立评估它们,因为某些条目可能相互依赖。因此,符合规范的阅读器或播放器可以同时检查多个条目(即使它们位于不同的字典中),以确定它们的值是否可以被满足。

MHBE 字典适用的媒体对象

以下媒体对象可以包含 MHBE 字典。它们的行为与前述描述一致,除非各自的子章节另有说明:

  • 呈现方式(Rendition)(参见 表 267
  • 媒体剪辑数据(Media Clip Data)(参见 表 276
  • 媒体剪辑区段(Media Clip Section)(参见 表 278
  • 媒体播放参数(Media Play Parameters)(参见 表 280
  • 媒体屏幕参数(Media Screen Parameters)(参见 表 283

When playing multimedia content, the conforming reader shall often make decisions such as which player software and which options, such as volume and duration, to use.

In making these decisions, the viewer shall determine the viability of the objects used. If an object is considered non-viable, the media should not be played. If the object is viable, the media should be played, though possibly under less than optimum conditions.

There are several entries in the multimedia object dictionaries whose values shall have an effect on viability. In particular, some of the object dictionaries define two entries that divide options into one of two categories:

  • MH (“must honour”): The options specified by this entry shall be honoured; otherwise, the containing object shall be considered non-viable.
  • BE (“best effort”): An attempt should be made to honour the options; however, if they cannot be honoured, the containing object is still considered viable.

MH and BE are both dictionaries, and the same entries shall be defined for both of them. In any dictionary where these entries are allowed, both entries may be present, or only one, or neither.

EXAMPLE

The media play parameters dictionary (see Table 279) allows the playback volume to be set by means of the V entry in its MH and BE dictionaries (see Table 280).

If the specified volume cannot be honoured, the object shall be considered non-viable if V is in the MH dictionary, and playback shall not occur. If V is in the BE dictionary (and not also in the MH dictionary), playback should still occur: the playing software attempts to honour the specified option as best it can.

Using this mechanism, authors may specify minimum requirements (MH) and preferred options (BE). They may also specify how entries that are added in the future to the multimedia dictionaries shall be interpreted by old conforming readers. If an entry that is unrecognized by the viewer is in the MH dictionary, the object shall be considered non-viable. If an unrecognized entry is in a BE dictionary, the entry shall be ignored and viability shall be unaffected. Unless otherwise stated, an object shall be considered non-viable if its MH dictionary contains an unrecognized key or an unrecognized value for a recognized key.

The following rules apply to the entries in MH and BE dictionaries, which behave somewhat differently from other PDF dictionaries:

  • If an entry is required, the requirement is met if the entry is present in either the MH dictionary or the BE dictionary.
  • If an optional entry is not present in either dictionary, it shall be considered to be present with its default value (if one is defined) in the BE dictionary.
  • If an instance of the same entry is present in both MH and BE, the instance in the BE dictionary shall be ignored unless otherwise specified.
  • If the value of an entry in an MH or a BE dictionary is a dictionary or array, it shall be treated as an atomic unit when determining viability. That is, all entries within the dictionary or array shall be honoured for the containing object to be viable.

NOTE

When determining whether entries can be honoured, it is not required that each one be evaluated independently, since they may be dependent on one another. That is, a conforming reader or player may examine multiple entries at once (even within different dictionaries) to determine whether their values can be honoured.

The following media objects may have MH and BE dictionaries. They function as described previously, except where noted in the individual sub-clauses:

13.2.3 演绎版

13.2.3 Renditions

13.2.3.1 概述

13.2.3.1 General

呈现方式(Rendition)对象类型

呈现方式对象(rendition)分为两种类型:

  • 媒体呈现方式(Media Rendition)(参见 13.2.3.2,“媒体呈现方式”):基本的媒体对象,指定播放的内容、播放方式以及播放位置。
  • 选择器呈现方式(Selector Rendition)(参见 13.2.3.3,“选择器呈现方式”):包含一个有序的呈现方式列表。该列表可以包括其他选择器呈现方式,从而形成一个树结构,其叶节点为媒体呈现方式。符合规范的阅读器应播放该树结构中遇到的第一个 可行的(viable) 媒体呈现方式(参见 13.2.2,“可行性”)。

注 1

表 266 列出了所有呈现方式字典的通用条目。呈现方式字典中的 N 条目指定一个名称,该名称可用于通过名称树查找访问该呈现方式对象(参见 表 31)。例如,JavaScript 操作(参见 12.6.4.16,“JavaScript 操作”)使用此机制。由于名称树引用的值必须是间接对象,因此所有呈现方式对象都应是间接对象。

注 2

呈现方式字典 不要求必须具有 名称树(name tree) 条目。如果具有名称树条目,符合规范的阅读器应确保名称树中指定的名称与 N 条目的值保持一致(例如,如果用户界面允许更改名称)。文档不应包含多个具有相同名称的呈现方式。

MH 和 BE 条目

MHBE 是字典,其条目可能出现在其中一个或两个字典中,如 13.2.2 “可行性” 所述。对于 呈现方式(Rendition),这些字典应包含一个 C 条目(参见 表 267),其值为 媒体标准字典(media criteria dictionary),该字典指定一组标准,必须满足这些标准,才能使呈现方式被视为 可行(参见 表 268)。

媒体标准字典 的行为与其他 MH/BE 条目略有不同,如 13.2.2 “可行性” 所述:

  • 其所有条目指定的标准都必须被满足,无论它们位于 MH 还是 BE 字典中。
  • 唯一的例外 是:如果 BE 字典中的某个条目无法被符合规范的阅读器识别,则它不影响对象的可行性。
  • 如果 MHBE 字典都包含 媒体标准字典,则应单独评估两者中的条目,并且 MH 字典优先(相应的 BE 条目应被忽略)。

表 266 – 所有呈现方式字典的通用条目
键(Key) 类型(Type) 值(Value)
Type name (可选)字典描述的 PDF 对象类型;如果存在,对于 呈现方式(rendition) 对象,该值应为 Rendition
S name (必需)字典描述的呈现方式类型。可以是 MR(媒体呈现方式)或 SR(选择器呈现方式)。如果符合规范的阅读器无法识别该条目的值,则该呈现方式应被视为 不可行
N text string (可选)一个 Unicode 编码的文本字符串,指定呈现方式的名称,可用于用户界面显示及 JavaScript 通过名称树查找。
MH dictionary (可选)包含条目(参见 表 267),该条目必须被遵守,才能使呈现方式被视为 可行
BE dictionary (可选)包含条目(参见 表 267),该条目仅在 尽力而为(best effort) 的情况下生效。


表 267 – 呈现方式 MH/BE 字典中的条目
键(Key) 类型(Type) 值(Value)
C dictionary (可选)媒体标准字典(media criteria dictionary)(参见 表 268)。
该字典的行为与 13.2.2 “可行性” 中描述的其他 MH/BE 条目不同:
- 其所有条目指定的标准都必须被满足,无论它们位于 MH 还是 BE 字典中。
- 唯一的例外 是:如果 BE 字典中的某个条目无法被符合规范的阅读器识别,则它不影响对象的可行性。

表 268 – 媒体标准字典中的条目
键(Key) 类型(Type) 值(Value)
Type name (可选)该字典描述的 PDF 对象类型;如果存在,对于 媒体标准字典,其值应为 MediaCriteria
A boolean (可选)如果指定,则该条目的值应与用户对音频描述的偏好匹配,才能使该对象可行。
注 1   相当于 SMIL 的 systemAudioDesc 属性。
C boolean (可选)如果指定,则该条目的值应与用户对字幕文本的偏好匹配,才能使该对象可行。
注 2   相当于 SMIL 的 systemCaptions 属性。
O boolean (可选)如果指定,则该条目的值应与用户对音频配音的偏好匹配,才能使该对象可行。
S boolean (可选)如果指定,则该条目的值应与用户对字幕的偏好匹配,才能使该对象可行。
R integer (可选)如果指定,则系统的带宽(以比特每秒为单位)应大于或等于该条目的值,才能使该对象可行。
注 3   相当于 SMIL 的 systemBitrate 属性。
D dictionary (可选)一个字典(参见 表 269),指定对象可行所需的最小位深度。
注 4   相当于 SMIL 的 systemScreenDepth 属性。
Z dictionary (可选)一个字典(参见 表 270),指定对象可行所需的最小屏幕尺寸。
注 5   相当于 SMIL 的 systemScreenSize 属性。
V array (可选)一个软件标识对象数组(参见 13.2.7.4,“软件标识字典”)。如果该条目存在且非空,则符合规范的阅读器必须被该数组中的一个或多个对象标识,才能使该对象可行。
P array (可选)一个包含一个或两个名称对象的数组,指定最小(可选地还有最大)PDF 语言版本,其格式与文档目录中的 Version 条目相同(参见 表 28)。如果该条目存在且非空,则符合规范的阅读器所支持的多媒体构造版本必须在指定范围内,才能使该对象可行。
L array (可选)一个语言标识符数组(参见 14.9.2.2,“语言标识符”)。如果该条目存在且非空,则符合规范的阅读器运行的语言必须与某个语言标识符完全匹配,或者仅由与标识符的主代码匹配的主代码组成,才能使该对象可行。
注 6   相当于 SMIL 的 systemLanguage 属性。

Table 270 – Entries in a minimum screen size dictionary
键(Key) 类型(Type) 值(Value)
Type name (可选)该字典描述的 PDF 对象类型;如果存在,对于 最小位深度字典,其值应为 MinBitDepth
V integer (必需)一个正整数(0 或更大),指定呈现方式可行所需的最小显示器位深度(以位为单位)。不允许负值。
M integer (可选)一个 显示器指定值(参见 表 270),指定 V 应测试的显示器。如果该值无法识别,则该对象不可行。
默认值:0。

表 270 – 最小屏幕尺寸字典中的条目
Key Type Value
Type name (可选)此字典描述的 PDF 对象的类型;如果存在,则应为演绎对象的 MinScreenSize
V array (必需)包含两个非负整数的数组。M 指定的显示器的宽度和高度(以像素为单位)应分别大于或等于数组中第一个和第二个整数的值,这样此对象才可行。
M integer (可选)监视器说明符(参见表 293),指定应针对哪个监视器测试 V 的值。如果无法识别该值,则该对象不可行。
默认值:0。

There are two types of rendition objects:

  • A media rendition (see 13.2.3.2, “Media Renditions”) is a basic media object that specifies what to play, how to play it, and where to play it.
  • A selector rendition (see 13.2.3.3, “Selector Renditions”) contains an ordered list of renditions. This list may include other selector renditions, resulting in a tree whose leaves are media renditions. The conforming reader should play the first viable media rendition it encounters in the tree (see 13.2.2, “Viability”).

NOTE 1

Table 266 shows the entries common to all rendition dictionaries. The N entry in a rendition dictionary specifies a name that can be used to access the rendition object by means of name tree lookup (see Table 31). JavaScript actions (see 12.6.4.16, “JavaScript Actions”), for example, use this mechanism. Since the values referenced by name trees shall be indirect objects, all rendition objects should be indirect objects.

NOTE 2

A rendition dictionary is not required to have a name tree entry. When it does, the conforming reader should ensure that the name specified in the tree is kept the same as the value of the N entry (for example, if the user interface allows the name to be changed). A document should not contain multiple renditions with the same name.

The MH and BE entries are dictionaries whose entries may be present in one or the other of them, as described in 13.2.2, “Viability.” For renditions, these dictionaries shall have a single entry C (see Table 267), whose value shall have a media criteria dictionary specifying a set of criteria that shall be met for the rendition to be considered viable (see Table 268).

The media criteria dictionary behaves somewhat differently than other MH/BE entries, as they are described in 13.2.2, “Viability.” The criteria specified by all of its entries shall be met regardless of whether they are in an MH or a BE dictionary. The only exception is that if an entry in a BE dictionary is unrecognized by the conforming reader, it shall not affect the viability of the object. If a media criteria dictionary is present in both MH and BE, the entries in both dictionaries shall be individually evaluated, with MH taking precedence (corresponding BE entries shall be ignored).

Table 266 – Entries common to all rendition dictionaries
Key Type Value
Type name (Optional) The type of PDF object that dictionary describes; if present, shall be Rendition for a rendition object.
S name (Required) The type of rendition that this dictionary describes. May be MR for media rendition or SR for selector rendition. The rendition shall be considered non-viable if the conforming reader does not recognize the value of this entry.
N text string (Optional) A Unicode-encoded text string specifying the name of the rendition for use in a user interface and for name tree lookup by JavaScript actions.
MH dictionary (Optional) A dictionary whose entries (see Table 267) shall be honoured for the rendition to be considered viable.
BE dictionary (Optional) A dictionary whose entries (see Table 267) shall only be honoured in a “best effort” sense.

Table 267 – Entries in a rendition MH/BE dictionary
Key Type Value
C dictionary (Optional) A media criteria dictionary (see Table 268).
The media criteria dictionary behaves somewhat differently than other MH/BE entries described in 13.2.2, “Viability.” The criteria specified by all of its entries shall be met regardless of whether it is in an MH or a BE dictionary. The only exception is that if an entry in a BE dictionary is unrecognized by the conforming reader, it shall not affect the viability of the object.

Table 268 – Entries in a media criteria dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaCriteria for a media criteria dictionary.
A boolean (Optional) If specified, the value of this entry shall match the user’s preference for whether to hear audio descriptions in order for this object to be viable.
NOTE 1   Equivalent to SMIL’s systemAudioDesc attribute.
C boolean (Optional) If specified, the value of this entry shall match the user’s preference for whether to see text captions in order for this object to be viable. NOTE 2   Equivalent to SMIL’s systemCaptions attribute.
O boolean (Optional) If specified, the value of this entry shall match the user’s preference for whether to hear audio overdubs in order for this object to be viable.
S boolean (Optional) If specified, the value of this entry shall match the user’s preference for whether to see subtitles in order for this object to be viable.
R integer (Optional) If specified, the system’s bandwidth (in bits per second) shall be greater than or equal to the value of this entry in order for this object to be viable. NOTE 3   Equivalent to SMIL’s systemBitrate attribute.
D dictionary (Optional) A dictionary (see Table 269) specifying the minimum bit depth required in order for this object to be viable. NOTE 4   Equivalent to SMIL’s systemScreenDepth attribute.
Z dictionary (Optional) A dictionary (see Table 270) specifying the minimum screen size required in order for this object to be viable. NOTE 5   Equivalent to SMIL’s systemScreenSize attribute.
V array (Optional) An array of software identifier objects (see 13.2.7.4, “Software Identifier Dictionary”). If this entry is present and non-empty, the conforming reader shall be identified by one or more of the objects in the array in order for this object to be viable.
P array (Optional) An array containing one or two name objects specifying a minimum and optionally a maximum PDF language version, in the same format as the Version entry in the document catalog (see Table 28). If this entry is present and non-empty, the version of multimedia constructs fully supported by the conforming reader shall be within the specified range in order for this object to be viable.
L array (Optional) An array of language identifiers (see 14.9.2.2, “Language Identifiers”). If this entry is present and non-empty, the language in which the conforming reader is running shall exactly match a language identifier, or consist only of a primary code that matches the primary code of an identifier, in order for this object to be viable. NOTE 6   Equivalent to SMIL’s systemLanguage attribute.

Table 269 – Entries in a minimum bit depth dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MinBitDepth for a minimum bit depth dictionary.
V integer (Required) A positive integer (0 or greater) specifying the minimum screen depth (in bits) of the monitor for the rendition to be viable. A negative value shall not be allowed.
M integer (Optional) A monitor specifier (see Table 270) that specifies which monitor the value of V should be tested against. If the value is unrecognized, the object shall not be viable.
Default value: 0.

Table 270 – Entries in a minimum screen size dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MinScreenSize for a rendition object.
V array (Required) An array containing two non-negative integers. The width and height (in pixels) of the monitor specified by M shall be greater than or equal to the values of the first and second integers in the array, respectively, in order for this object to be viable.
M integer (Optional) A monitor specifier (see Table 293) that specifies which monitor the value of V should be tested against. If the value is unrecognized, the object shall be not viable.
Default value: 0.

13.2.3.2 媒体演绎

13.2.3.2 Media Renditions

表 271 列出了 媒体呈现字典 中的条目。这些条目分别指定了要播放的媒体 (C),播放方式 (P),以及播放位置 (SP)。当且仅当 CPSP 条目所引用的对象都是可行的,媒体呈现对象 才是可行的。

C 只有在引用的播放器不接受任何有效输入的情况下才可以省略。这种情况下,P 必须存在,并且其引用的 媒体播放参数字典(参见 表 279)必须包含 PL 条目,而 PL 所引用的 媒体播放器字典(参见 13.2.7.2,“媒体播放器字典”)必须包含一个非空的 MU 数组或非空的 A 数组。

表 271 – 媒体呈现字典中的附加条目
键(Key) 类型(Type) 值(Value)
C dictionary (可选)一个 媒体剪辑字典(参见 13.2.4,“媒体剪辑对象”),用于指定播放 媒体呈现对象 时应播放的内容。
P dictionary (如果 C 不存在则必需,否则可选)一个 媒体播放参数字典(参见 13.2.5,“媒体播放参数”),用于指定 媒体呈现对象 的播放方式。
默认值:一个 媒体播放参数字典,其条目(参见 表 279)均包含默认值。
SP dictionary (可选)一个 媒体屏幕参数字典(参见 13.2.6,“媒体屏幕参数”),用于指定 媒体呈现对象 的播放位置。
默认值:一个 媒体屏幕参数字典,其条目(参见 表 282)均包含默认值。

Table 271 lists the entries in a media rendition dictionary. Its entries specify what media should be played (C), how (P), and where (SP) it should be played. A media rendition object shall be viable if and only if the objects referenced by its C, P, and SP entries are viable.

C may be omitted only in cases where a referenced player takes no meaningful input. This requires that P shall be present and that its referenced media play parameters dictionary (see Table 279) shall contain a PL entry, whose referenced media players dictionary (see 13.2.7.2, “Media Players Dictionary”) has a non-empty MU array or a non-empty A array.

Table 271 – Additional entries in a media rendition dictionary
Key Type Value
C dictionary (Optional) A media clip dictionary (see 13.2.4, “Media Clip Objects”) that specifies what should be played when the media rendition object is played.
P dictionary (Required if C is not present, otherwise optional) A media play parameters dictionary (see 13.2.5, “Media Play Parameters””) that specifies how the media rendition object should be played.
Default value: a media play parameters dictionary whose entries (see Table 279) all contain their default values.
SP dictionary (Optional) A media screen parameters dictionary (see 13.2.6, “Media Screen Parameters”) that specifies where the media rendition object should be played.
Default value: a media screen parameters dictionary whose entries (see Table 282) all contain their default values.

13.2.3.3 选择器呈现

13.2.3.3 Selector Renditions

选择器呈现字典(selector rendition dictionary)应在其 R 条目中指定一个 呈现对象 数组(参见 表 272)。该数组中的 呈现对象 应按优先级排序,最优先的呈现在最前。播放时,应依次评估数组中的 呈现对象,并播放第一个可行的 媒体呈现(media rendition)(如果存在)。如果数组中的某个 呈现对象 本身是一个 选择器呈现,则应进一步评估该选择器,类似于深度优先搜索(DFS)。选择器呈现 本身也可能不可行,在这种情况下,不应评估其关联的任何 媒体呈现(相当于跳过该树分支)。

注意

例如,该机制可用于指定在高带宽设备上使用大尺寸视频剪辑,而在低带宽设备上使用小尺寸视频剪辑。

表 272 – 选择器呈现字典的特定附加条目
键(Key) 类型(Type) 值(Value)
R array (必需)一个 呈现对象 数组。在数组中找到的第一个可行 媒体呈现对象,或嵌套于 选择器呈现 内的第一个可行 媒体呈现对象,应被使用。空数组是合法的。

A selector rendition dictionary shall specify an array of rendition objects in its R entry (see Table 272). The renditions in this array should be ordered by preference, with the most preferred rendition first. At play-time, the renditions in the array shall be evaluated and the first viable media rendition, if any, shall be played. If one of the renditions is itself a selector, that selector shall be evaluated in turn, yielding the equivalent of a depth-first tree search. A selector rendition itself may be non-viable; in this case, none of its associated media renditions shall be evaluated (in effect, this branch of the tree is skipped).

NOTE

This mechanism may be used, for example, to specify that a large video clip should be used on high-bandwidth machines and a smaller clip should be used on low-bandwidth machines.

Table 272 – Additional entries specific to a selector rendition dictionary
Key Type Value
R array (Required) An array of rendition objects. The first viable media rendition object found in the array, or nested within a selector rendition in the array, should be used. An empty array is legal.

13.2.4 媒体剪辑对象

13.2.4 Media Clip Objects

13.2.4.1 概述

13.2.4.1 General

媒体剪辑对象(media clip objects)有两种类型,由 S 子类型决定:

  • MCD(媒体剪辑数据,参见 13.2.4.2,“Media Clip Data”)
  • MCS(媒体剪辑片段,参见 13.2.4.3,“Media Clip Section”)

所有 媒体剪辑字典 共有的条目列在 表 273 中。

表 273 – 媒体剪辑字典的通用条目
键(Key) 类型(Type) 值(Value)
Type name (可选)该字典描述的 PDF 对象类型;如果存在,该值应为 MediaClip,表示一个 媒体剪辑字典
S name (必需)该字典描述的 媒体剪辑 子类型。可以是 MCD(媒体剪辑数据,参见 13.2.4.2,“Media Clip Data”),或 MCS(媒体剪辑片段,参见 13.2.4.3,“Media Clip Section”)。如果符合规范的阅读器无法识别该条目的值,则该 媒体剪辑 应被视为不可行。
N text string (可选)媒体剪辑 的名称,用于用户界面显示。

There are two types of media clip objects, determined by the subtype S, which can be either MCD for media clip data (see 13.2.4.2, “Media Clip Data”) or MCS for media clip section (see 13.2.4.3, “Media Clip Section”). The entries common to all media clip dictionaries are listed in Table 273.

Table 273 – Entries common to all media clip dictionaries
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaClip for a media clip dictionary.
S name (Required) The subtype of media clip that this dictionary describes. May be MCD for media clip data (see 13.2.4.2, “Media Clip Data”) or MCS for a media clip section (see 13.2.4.3, “Media Clip Section”). The media clip shall be considered non-viable if the conforming reader does not recognize the value of this entry.
N text string (Optional) The name of the media clip, for use in the user interface.

13.2.4.2 媒体剪辑数据

13.2.4.2 Media Clip Data

媒体剪辑数据字典(media clip data dictionary)用于定义可播放的媒体对象数据。其条目列在 表 274 中。

注 1

该字典可以引用一个 URL 指向流式视频演示,或引用嵌入到 PDF 文件中的电影。

表 274 – 媒体剪辑数据字典的附加条目
键(Key) 类型(Type) 值(Value)
D 文件规范或流(file specification or stream) (必需)一个完整的 文件规范表单 XObject,用于指定实际的媒体数据。
CT ASCII 字符串 (可选;不适用于表单 XObject)标识 D 中数据类型的 ASCII 字符串。该字符串应符合 Internet RFC 2045(多用途互联网邮件扩展,MIME 第 1 部分)的内容类型规范(参见 参考文献)。
P 字典 (可选)一个 媒体权限字典(见 表 275),用于控制媒体数据的使用权限。
默认值:包含默认值的 媒体权限字典
Alt 数组 (可选)提供媒体剪辑数据的 备用文本描述,用于无法播放媒体时的替代内容;参见 14.9.2.4,“多语言文本数组”(Multi-language Text Arrays)。
PL 字典 (可选)一个 媒体播放器字典(见 13.2.7.2,“媒体播放器字典”),用于标识合法或不合法的媒体播放器。
如果该 媒体播放器字典 不可行,则 媒体剪辑数据 也应被视为不可行。
MH 字典 (可选)一个字典,其中的条目(见 表 276)必须被遵守,以使 媒体剪辑数据 被视为可行。
BE 字典 (可选)一个字典,其中的条目(见 表 276)仅应在“尽力而为”(best effort)的情况下遵守。


如果 D 条目引用的对象不包含 Type 条目,Type 条目不可识别,或引用的对象既不是字典也不是流,则 媒体剪辑数据对象 应被视为不可行。

这实际上排除了使用简单的 文件规范(参见 7.11,“文件规范”)。

如果 D 引用了一个包含 嵌入文件流(embedded file stream)的文件规范(参见 7.11.4,“嵌入文件流”),那么即使该 嵌入文件流 具有 Subtype 条目,该条目也应被忽略,媒体剪辑数据字典的 CT 条目应标识数据类型。

如果 D 引用了一个 表单 XObject,则其关联的播放器隐式地为 符合规范的阅读器,并且该 表单 XObject 应按普通数据类型进行渲染。

注 2

媒体播放参数字典(见 表 279)中的 FD 条目,应该与 表单 XObject 适用,就像它们适用于 QuickTime 电影一样。

对于 非表单 XObject 的媒体,媒体剪辑对象 应提供足够的信息,使 符合规范的阅读器 能够找到合适的播放器。这可以通过提供以下一项或两项条目来完成,优先使用第一种方法:

  • CT 条目:指定媒体的内容类型。如果该条目存在,则所选播放器必须支持该内容类型。
  • PL 条目:指定一个或多个可用于播放引用媒体的播放器。如果 CT 存在,则通常应同时提供 PL

P 条目用于指定 媒体权限字典(见 表 275),该字典规定了 符合规范的阅读器 可以如何使用该媒体数据。这些权限允许作者控制数据的使用方式,以防止其被复制。如果 媒体权限字典 包含不可识别的条目,或条目值不可识别,则应将其视为不可行,且 符合规范的阅读器 不应播放该媒体。

表 275 – 媒体权限字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaPermissions,表示媒体权限字典。
TF ASCII 字符串 (可选)一个 ASCII 字符串,指示在何种情况下允许写入临时文件以播放媒体剪辑。有效值包括:
(TEMPNEVER)   永不允许。
(TEMPEXTRACT)   仅在文档权限允许内容提取时允许;当用户访问权限的第 5 位(见 表 22)被设置时。
(TEMPACCESS) 仅在文档权限允许内容提取时允许,包括为了可访问性目的;当用户访问权限的第 5 位或第 10 位(见 表 22)被设置时,或两者都设置时。
(TEMPALWAYS) 永远允许。
默认值: (TEMPNEVER)。
未识别的值应视为 (TEMPNEVER)。


媒体剪辑数据中的 MHBE 字典(见 表 276)中的 BU 条目指定了媒体数据的基础 URL。媒体中的相对 URL(指向辅助文件或用于超链接)应根据 BU 的值进行解析。以下是有关 BU 条目的附加要求:

  • 如果 BU 存在于 MH 字典中,并且未遵循基础 URL,则媒体剪辑数据应视为不可行。

注 3

例如,播放器不接受基础 URL。

  • 确定对象的可行性时不需要检查基础 URL 是否有效。

注 4

目标主机存在。

  • 媒体中的绝对 URL 不应受影响。
  • 如果媒体本身包含基础 URL,则应优先使用该值,而不是 BU

注 5

例如,HTML 中定义了 <BASE> 元素。

  • BU 完全独立,并且与文档目录中的 URI 条目的值(见 7.7.2,“文档目录”)无关。
  • 如果没有 BU 条目并且媒体嵌入在文档中,则应将 PDF 文件本身的 URL 视为 BE 字典中的 BU 条目的值;即作为隐式的尽力而为的基础 URL。

表 276 – 媒体剪辑数据 MH/BE 字典中的条目
键(Key) 类型(Type) 值(Value)
BU ASCII 字符串 (可选)一个绝对 URL,应作为解析媒体数据中的任何相对 URL 的基础 URL 使用。

A media clip data dictionary defines the data for a media object that can be played. Its entries are listed in Table 274

NOTE 1

It may reference a URL to a streaming video presentation or a movie embedded in the PDF file.

Table 274 – Additional entries in a media clip data dictionary
Key Type Value
D file specification or stream (Required) A full file specification or form XObject that specifies the actual media data.
CT ASCII string (Optional; not allowed for form XObjects) An ASCII string identifying the type of data in D. The string should conform to the content type specification described in Internet RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies (see the Bibliography).
P dictionary (Optional) A media permissions dictionary (see Table 275) containing permissions that control the use of the media data. Default value: a media permissions dictionary containing default values.
Alt array (Optional) An array that provides alternate text descriptions for the media clip data in case it cannot be played; see 14.9.2.4, “Multi-language Text Arrays.”
PL dictionary (Optional) A media players dictionary (see 13.2.7.2, “Media Players Dictionary”) that identifies, among other things, players that are legal and not legal for playing the media.
If the media players dictionary is non-viable, the media clip data shall be non-viable.
MH dictionary (Optional) A dictionary whose entries (see Table 276) shall be honoured for the media clip data to be considered viable.
BE dictionary (Optional) A dictionary whose entries (see Table 276) should only be honoured in a “best effort” sense.

The media clip data object shall be considered non-viable if the object referenced by the D entry does not contain a Type entry, the Type entry is unrecognized, or the referenced object is not a dictionary or stream.

This shall effectively exclude the use of simple file specifications (see 7.11, “File Specifications”).

If D references a file specification that has an embedded file stream (see 7.11.4, “Embedded File Streams”), the embedded file stream’s Subtype entry shall be ignored if present, and the media clip data dictionary’s CT entry shall identify the type of data.

If D references a form XObject, the associated player is implicitly the conforming reader, and the form XObject shall be rendered as if it were any other data type.

NOTE 2

The F and D entries in the media play parameters dictionary (see Table 279) should apply to a form XObject just as they do to a QuickTime movie.

For media other than form XObjects, the media clip object shall provide enough information to allow a conforming reader to locate an appropriate player. This may be done by providing one or both of the following entries, the first being the preferred method:

  • A CT entry that specifies the content type of the media. If this entry is present, any player that is selected shall support this content type.
  • A PL entry that specifies one or more players that may be used to play the referenced media. if CT is present, there should also be a PL present.

The P entry specifies a media permissions dictionary (see Table 275) specifying the manner in which the data referenced by the media may be used by a conforming reader. These permissions allow authors control over how their data is exposed to operations that could allow it to be copied. If the dictionary contains unrecognized entries or entries with unrecognized values, it shall be considered non-viable, and the conforming reader shall not play the media.

Table 275 – Entries in a media permissions dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaPermissions for a media permissions dictionary.
TF ASCII string (Optional) An ASCII string indicating the circumstances under which it is acceptable to write a temporary file in order to play a media clip. Valid values are:
(TEMPNEVER)   Never allowed.
(TEMPEXTRACT)   Allowed only if the document permissions allow content extraction; when bit 5 of the user access permissions (see Table 22) is set.
(TEMPACCESS) Allowed only if the document permissions allow content extraction, including for accessibility purposes; when bits 5 or 10 of the user access permissions (see Table 22) are set, or both.
(TEMPALWAYS) Always allowed.
Default value: (TEMPNEVER).
An unrecognized value shall be treated as (TEMPNEVER).

The BU entry in the media clip data MH and BE dictionaries (see Table 276) specifies a base URL for the media data. Relative URLs in the media (which point to auxiliary files or are used for hyperlinking) should be resolved with respect to the value of BU. The following are additional requirements concerning the BU entry:

  • If BU is in the MH dictionary and the base URL is not honoured the media clip data shall be non-viable.

NOTE 3

An example of this is that the player does not accept base URLs.

  • Determining the viability of the object shall not require checking whether the base URL is valid

NOTE 4

The target host exists.

  • Absolute URls within the media shall not be affected.
  • If the media itself contains a base URL, that value shall be used in preference to BU.

NOTE 5

An example of this is that the <BASE> element is defined in HTML.

  • BU is completely independent of and unrelated to the value of the URI entry in the document catalogu (see 7.7.2, “Document Catalog”).
  • If BU is not present and the media is embedded within the document, the URL to the PDF file itself shall be used as if it were the value of a BU entry in the BE dictionary; that is, as an implicit best-effort base URL.

Table 276 – Entries in a media clip data MH/BE dictionary
Key Type Value
BU ASCII string (Optional) An absolute URL that shall be used as the base URL in resolving any relative URLs found within the media data.

13.2.4.3 媒体剪辑部分

13.2.4.3 Media Clip Section

媒体剪辑区段字典

一个 媒体剪辑区段 字典(见 表 277)定义了另一个媒体剪辑对象(称为 下级 媒体剪辑对象)的一段连续区段。通过 D 条目指定的下级媒体剪辑对象可以是媒体剪辑数据对象或另一个媒体剪辑区段对象。然而,由 D 条目构成的链表应以媒体剪辑数据对象终止。如果下级媒体对象不可用,则媒体剪辑区段也应不可用。

注 1

一个媒体剪辑区段可以定义一个 15 分钟的片段,来自一个表示两小时电影的媒体剪辑数据对象。

Table 277 – 媒体剪辑部分词典中的附加条目
键(Key) 类型(Type) 值(Value)
D 字典(dictionary) (必需)定义此媒体剪辑区段对象的下级媒体对象(即下级媒体剪辑数据对象或媒体剪辑区段对象)。
Alt 数组(array) (可选)一个数组,提供媒体剪辑区段的备用文本描述,以防该区段无法播放;见 14.9.2.4,“多语言文本数组”。
MH 字典(dictionary) (可选)一个字典,其条目(见 表 278)应被尊重,以使媒体剪辑区段被认为是可行的。
BE 字典(dictionary) (可选)一个字典,其条目(见 表 278)应仅在“尽力而为”意义上被尊重。


媒体剪辑区段的 MHBE 字典中的 BE 条目(见 表 278)应通过指定偏移量的起始和结束位置,定义下级媒体对象中的一个子区段。根据媒体类型,偏移量可以通过时间、帧或标记来指定(见 13.2.6.2,“媒体偏移字典”)。BE 不要求指定相同类型的偏移量。

以下规则适用于这些偏移量:

  • 对于偏移量没有意义的媒体类型(如 JPEG 图像),应忽略 BE,且不影响可行性。
  • BE 由时间或帧指定时,其值应视为相对于下级媒体剪辑的起点。然而,如果 E 指定的偏移量超出了下级媒体剪辑的结束位置,应使用结束值,且不影响可行性。
  • BE 由标记指定时,应有一个对应的绝对偏移量进入底层的媒体剪辑数据对象。如果该偏移量不在下级媒体剪辑定义的范围内(如果有),或标记不存在于底层媒体剪辑中,则应忽略该条目的存在,且不影响可行性。
  • 如果由所有 B 条目计算得出的绝对偏移量大于或等于所有 E 条目计算得出的绝对偏移量,则应定义一个空区间。空区间是合法的。
  • 媒体剪辑区段的 MH 字典中的任何 BE 条目应在播放时得到遵守,才能使媒体剪辑区段被认为是可行的。

注 2

如果条目的值不可行,或播放器不支持其值,则可能无法遵守该条目;例如,播放器不支持标记。

  • 如果 BE 条目位于媒体剪辑区段的 MH 字典中,则所有在更深层次(接近媒体剪辑数据)的 BE 条目应被视为在 MH 字典中评估(即使它们实际上位于 BE 字典中)。
  • 如果 BE 条目位于 BE 字典中且无法支持,则在播放时可以忽略它。

表 278 – 媒体剪辑区段 MH/BE 字典中的条目
键(Key) 类型(Type) 值(Value)
B 字典(dictionary) (可选)一个媒体偏移字典(见 13.2.6.2,“媒体偏移字典”),指定媒体剪辑区段开始的下级媒体对象中的偏移量。默认值:下级媒体对象的起点。
E 数组(array) (可选)一个媒体偏移字典(见 13.2.6.2,“媒体偏移字典”),指定媒体剪辑区段结束的下级媒体对象中的偏移量。默认值:下级媒体对象的结束位置。

A media clip section dictionary (see Table 277) defines a continuous section of another media clip object (known as the next-level media clip object). The next-level media clip object, specified by the D entry, may be either a media clip data object or another media clip section object. However, the linked list formed by the D entries of media clip sections shall terminate in a media clip data object. If the next-level media object is non- viable, the media clip section shall be also non-viable.

NOTE 1

A media clip section could define a 15-minute segment of a media clip data object representing a two-hour movie.

Table 277 – Additional entries in a media clip section dictionary
Key Type Value
D dictionary (Required) The media clip section or media clip data object (the next-level media object) of which this media clip section object defines a continuous section.
Alt array (Optional) An array that provides alternate text descriptions for the media clip section in case it cannot be played; see 14.9.2.4, “Multi-language Text Arrays.”
MH dictionary (Optional) A dictionary whose entries (see Table 278) shall be honoured for the media clip section to be considered viable.
BE dictionary (Optional) A dictionary whose entries (see Table 278) shall only be honoured in a “best effort” sense.

The B and E entries in the media clip section’s MH and BE dictionaries (see Table 278) shall define a subsection of the next-level media object referenced by D by specifying beginning and ending offsets into it. Depending on the media type, the offsets may be specified by time, frames, or markers (see 13.2.6.2, “Media Offset Dictionary”). B and E are not required to specify the same type of offset.

The following rules apply to these offsets:

  • For media types where an offset makes no sense (such as JPEG images), B and E shall be ignored, with no effect on viability.
  • When B or E are specified by time or frames, their value shall be considered to be relative to the start of the next-level media clip. However, if E specifies an offset beyond the end of the next-level media clip, the end value shall be used instead, and there is no effect on viability.
  • When B or E are specified by markers, there shall be a corresponding absolute offset into the underlying media clip data object. If this offset is not within the range defined by the next-level media clip (if any), or if the marker is not present in the underlying media clip, the existence of the entry shall be ignored, and there is no effect on viability.
  • If the absolute offset derived from the values of all B entries in a media clip section chain is greater than or equal to the absolute offset derived from the values of all E entries, an empty range shall be defined. An empty range is legal.
  • Any B or E entry in a media clip section’s MH dictionary shall be honoured at play-time in order for the media clip section to be considered viable.

NOTE 2

The entry may not be honored if its value was not viable or if the player did not support its value; for example, the player did not support markers.

  • If a B or E entry is in a media clip section’s MH dictionary, all B or E entries, respectively, at deeper levels (closer to the media clip data), shall be evaluated as if they were in an MH dictionary (even if they are actually within BE dictionaries).
  • If B or E entry in a BE dictionary cannot be supported, it may be ignored at play-time.

Table 278 – Entries in a media clip section MH/BE dictionary
Key Type Value
B dictionary (Optional) A media offset dictionary (see 13.2.6.2, “Media Offset Dictionary”) that specifies the offset into the next-level media object at which the media clip section begins. Default: the start of the next-level media object.
E array (Optional) A media offset dictionary (see 13.2.6.2, “Media Offset Dictionary”) that specifies the offset into the next-level media object at which the media clip section ends. Default: the end of the next-level media object.

13.2.5 媒体播放参数

13.2.5 Media Play Parameters

媒体播放参数字典指定了如何播放媒体对象。它应从媒体呈现中引用(见 13.2.3.2,“媒体呈现”)。

表 279 – 媒体播放参数字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaPlayParams,用于媒体播放参数字典。
PL 字典(dictionary) (可选)一个媒体播放器字典(见 13.2.7.2,“媒体播放器字典”),识别合法和非法的播放器,以播放该媒体。
如果该对象不可用,则媒体播放参数字典应被视为不可用。
MH 字典(dictionary) (可选)一个字典,其条目(见 表 278)应被遵守,以使媒体播放参数被认为是可行的。
BE 字典(dictionary) (可选)一个字典,其条目(见 表 278)应仅在“尽力而为”意义上被遵守。


表 280 – 媒体播放参数 MH/BE 字典中的条目
键(Key) 类型(Type) 值(Value)
V 整数(integer) (可选)一个整数,指定所需的音量级别,作为录制音量级别的百分比。零值应等于静音;负值应为非法。默认值:100。
C 布尔值(boolean) (可选)一个标志,指定是否在播放时显示播放器特定的控制界面。
例子   播放/暂停/停止控制。
默认值:false
F 整数(integer) (可选)播放器应如何处理与播放矩形不完全匹配的视觉媒体类型。
0 媒体的宽度和高度应按比例缩放,以便在保持纵横比的同时,使媒体和播放矩形具有最大的交集,并确保显示所有媒体内容。
注 1   同 SMIL 的 fit 属性的 “meet” 值。
1 媒体的宽度和高度应按比例缩放,以便完全填充播放矩形,并尽量减少不适配播放矩形的媒体内容。
注 2   同 SMIL 的 fit 属性的 “slice” 值。
2 媒体的宽度和高度应独立缩放,以便使媒体和播放矩形相同;不保留纵横比。
注 3   同 SMIL 的 fit 属性的 “fill” 值。
3 媒体不应缩放。如果媒体矩形比播放矩形宽或高,应提供滚动用户界面。
注 4   同 SMIL 的 fit 属性的 “scroll” 值。
4 媒体不应缩放。仅显示与播放矩形相交的媒体矩形部分。
注 5   同 SMIL 的 fit 属性的 “hidden” 值。
5 使用播放器的默认设置(作者没有偏好)。
默认值:5。
如果条目在 BE 字典中,则未识别的值应被视为默认值。如果条目在 MH 字典中,并且具有未识别的值,则该对象应被视为不可用。
D 字典(dictionary) (可选)一个媒体持续时间字典(见 表 281)。默认值:指定固有持续时间的字典(见 RC)。
A 布尔值(boolean) (可选)如果为 true,则媒体在激活时自动播放。如果为 false,则媒体在激活时初始暂停。
例子   显示第一帧。
仅对可以暂停的媒体相关。默认值:true
RC 数字(number) (可选)指定持续时间 D 的重复次数。
注 6   类似于 SMIL 的 repeatCount 属性。零表示永远重复。负值应为非法;非整数值应为合法。
默认值:1.0。

D 条目的值是一个媒体持续时间字典,其条目如表 281 所示。它指定了一个时间持续性。

注 1

D 条目字典的时间持续性对应于 SMIL 中的简单持续时间概念。

持续时间可以是一个特定的时间段,可能是无限的,或者可能是媒体的固有持续时间。

例子

一个两小时的 QuickTime 电影的固有持续时间是两小时。

当使用媒体剪辑部分(见 13.2.4.3,“媒体剪辑部分”)时,固有持续时间可以被修改:固有持续时间应为绝对开始和结束偏移量之间的差值。对于没有时间概念的媒体类型(如 JPEG 图像),持续时间应被视为无限。

如果简单持续时间长于固有持续时间,播放器应将媒体冻结在其最后状态,直到简单持续时间经过。对于视觉媒体类型,应显示最后一个画面(帧)。对于听觉媒体类型,媒体在逻辑上被冻结,但不会继续产生声音。

注 2

在这种情况下,指定重复次数的 RC 条目适用于简单持续时间;因此,整个播放-暂停序列将重复 RC 次。

表 281 – 媒体持续时间字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaDuration,用于媒体持续时间字典。
S 名称(name) (必需)媒体持续时间字典的子类型。有效值为:
I   持续时间是相关媒体的固有持续时间
F   持续时间是无限的
T   持续时间应由 T 条目指定
如果符合要求的读者无法识别此条目的值,则媒体持续时间字典应视为不可用。
T 字典(dictionary) (如果 S 的值为 T,则必需;否则忽略)一个时间跨度字典,指定一个明确的持续时间(见 表 289)。负持续时间是非法的。

A media play parameters dictionary specifies how a media object should be played. It shall be referenced from a media rendition (see 13.2.3.2, “Media Renditions”).

Table 279 – Entries in a media play parameters dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaPlayParams for a media play parameters dictionary.
PL dictionary (Optional) A media players dictionary (see 13.2.7.2, “Media Players Dictionary”) that identifies, among other things, players that are legal and not legal for playing the media.
If this object is non-viable, the media play parameters dictionary shall be considered non-viable.
MH dictionary (Optional) A dictionary whose entries (see Table 278) shall be honoured for the media play parameters to be considered viable.
BE dictionary (Optional) A dictionary whose entries (see Table 278) shall only be honoured in a “best effort” sense.

Table 280 – Entries in a media play parameters MH/BE dictionary
Key Type Value
V integer (Optional) An integer that specifies the desired volume level as a percentage of recorded volume level. A zero value shall be equivalent to mute; negative values shall be illegal. Default value: 100.
C boolean (Optional) A flag specifying whether to display a player-specific controller user interface when playing.
EXAMPLE   play/pause/stop controls.
Default value: false
F integer (Optional) The manner in which the player shall treat a visual media type that does not exactly fit the rectangle in which it plays.
0 The media’s width and height shall be scaled while preserving the aspect ratio so that the media and play rectangles have the greatest possible intersection while still displaying all media content.
NOTE 1   Same as “meet” value of SMIL’s fit attribute.
1 The media’s width and height shall be scaled while preserving the aspect ratio so that the play rectangle is entirely filled, and the amount of media content that does not fit within the play rectangle shall be minimized.
NOTE 2   Same as “slice” value of SMIL’s fit attribute.
2 The media’s width and height shall be scaled independently so that the media and play rectangles are the same; the aspect ratio shall not be preserved.
NOTE 3   Same as “fill” value of SMIL’s fit attribute.
3 The media shall not be scaled. A scrolling user interface shall be provided if the media rectangle is wider or taller than the play rectangle.
NOTE 4   Same as “scroll” value of SMIL’s fit attribute.
4 The media shall not be scaled. Only the portions of the media rectangle that intersect the play rectangle shall be displayed.
NOTE 5   Same as “hidden” value of SMIL’s fit attribute.
5 Use the player’s default setting (author has no preference).
Default value: 5.
An unrecognized value shall be treated as the default value if the entry is in a BE dictionary. If the entry is in an MH dictionary and it has an unrecognized value, the object shall be considered non-viable.
D dictionary (Optional) A media duration dictionary (see Table 281). Default value: a dictionary specifying the intrinsic duration (see RC).
A boolean (Optional) If true, the media shall automatically play when activated. If false, the media shall be initially paused when activated.
EXAMPLE   The first frame is displayed.
Relevant only for media that may be paused. Default value: true.
RC number (Optional) Specifies the number of iterations of the duration D to repeat.
NOTE 6   Similar to SMIL’s repeatCount attribute. Zero means repeat forever. Negative values shall be illegal; non-integral values shall be legal.
Default value: 1.0.

The value of the D entry is a media duration dictionary, whose entries are shown in Table 281. It specifies a temporal duration.

NOTE 1

The D entry dictionary temporal duration corresponds to the notion of a simple duration in SMIL.

The duration may be a specific amount of time, it may be infinity, or it may be the media’s intrinsic duration.

EXAMPLE

The intrinsic duration of a two-hour QuickTime movie is two hours.

The intrinsic duration may be modified when a media clip section (see 13.2.4.3, “Media Clip Section”) is used: the intrinsic duration shall be the difference between the absolute begin and end offsets. For a media type having no notion of time (such as a JPEG image), the duration shall be considered to be infinity.

If the simple duration is longer than the intrinsic duration, the player shall freeze the media in its final state until the simple duration has elapsed. For visual media types, the last appearance (frame) shall be displayed. For aural media types, the media is logically frozen but shall not continue to produce sound.

NOTE 2

In this case, the RC entry, which specifies a repeat count, applies to the simple duration; therefore, the entire play-pause sequence is repeated RC times.

Table 281 – Entries in a media duration dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaDuration for a media duration dictionary.
S name (Required) The subtype of media duration dictionary. Valid values are:
I   The duration is the intrinsic duration of the associated media
F   The duration is infinity
T   The duration shall be specified by the T entry
The media duration dictionary shall be considered non-viable if the conforming reader does not recognize the value of this entry.
T dictionary (Required if the value of S is T; otherwise ignored) A timespan dictionary specifying an explicit duration (see Table 289). A negative duration is illegal.

13.2.6 媒体屏幕参数

13.2.6 Media Screen Parameters

13.2.6.1 概述

13.2.6.1 General

媒体屏幕参数字典(见表 282)应指定媒体对象应在哪个屏幕上播放。它应包含 MHBE 字典(见表 283),这些字典应按照 13.2.2 “可行性” 中讨论的方式起作用。所有正在播放的媒体剪辑应与特定文档关联,并且在文档关闭时停止播放。

符合规范的阅读器应禁止浮动窗口和全屏窗口,除非用户明确允许。原因是,如果包含任意媒体内容的窗口能够在没有向用户明确表示该窗口仅承载媒体对象的情况下显示,就可能出现基于文档的安全攻击。如果能够向用户传达这些窗口的性质,这一建议可以放宽;例如,通过浮动窗口的标题栏中的文本。

表 282 – 媒体屏幕参数字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaScreenParams,用于媒体屏幕参数字典。
MH 字典(dictionary) (可选)一个字典,其条目(见 表 283)应为媒体屏幕参数的可行性提供支持。
BE 字典(dictionary) (可选)一个字典,其条目(见 表 283)应受到尊重。

表 283 – 媒体屏幕参数字典中的条目
键(Key) 类型(Type) 值(Value)
W 整数(integer) (可选)媒体对象应在哪种类型的窗口中播放:
0   浮动窗口
1   完全覆盖其他窗口的全屏窗口
2   隐藏窗口
3   与媒体呈现相关的屏幕注释所占据的矩形区域(见 12.5.6.18,“屏幕注释”)
默认值:3。MH 中的未识别值:对象不可用;BE 中的未识别值:视为默认值处理。
B 数组(array) (可选)一个包含三个数字的数组,范围从 0.0 到 1.0,指定用于背景颜色的 DeviceRGB 颜色空间中的分量,用于播放媒体的矩形区域。如果媒体对象未完全覆盖矩形区域或有透明部分,则使用此颜色。对于隐藏窗口,该颜色应被忽略。
默认值:由实现定义。符合规范的阅读器应根据 W 的值选择一个合理的背景色。
例 1   浮动窗口的系统默认背景色或全屏窗口的用户首选背景色。
如果媒体格式具有固有的背景色,B 不应覆盖它。然而,如果媒体具有透明区域或未完全覆盖整个窗口,B 颜色应可见。
O 数字(number) (可选)一个在 0.0 到 1.0 范围内的数字,指定在绘制由 B 指定的背景颜色时使用的常量不透明度值。值小于 1.0 表示窗口应透明。
例 2   如果媒体未覆盖整个浮动窗口,浮动窗口后面的窗口将会显示出来。
0.0 的值表示完全透明,应使 B 无效。它应在全屏和隐藏窗口中被忽略。
默认值:1.0(完全不透明)。
M 整数(integer) (可选)一个显示器说明符(见表 293),指定在多显示器系统中,浮动或全屏窗口应显示在哪个显示器上。对于其他类型的窗口,此条目应被忽略。
默认值:0(文档显示器)。MH 中的未识别值:对象不可用;BE 中的未识别值:视为默认值处理。
F 字典(dictionary) (如果 W 的值为 0,则必需;否则忽略)一个浮动窗口参数字典(见 表 284),用于指定显示浮动窗口时使用的大小、位置和选项。

媒体屏幕参数字典中的 F 条目

媒体屏幕参数字典 MH/BE 中的 F 条目应为浮动窗口参数字典,其条目列在 表 284 中。浮动窗口参数字典中的条目应当像它们在 MHBE 字典中一样被处理。也就是说,包含的条目应单独评估其可行性,而不是整体评估字典的可行性。(MHBE 中可能都有一个 F 条目。在这种情况下,如果某一条目同时存在于两个浮动窗口参数字典中,则应优先使用 MH 字典中的条目。)

DPRT 条目应用于指定浮动窗口占据的矩形区域。一旦创建,浮动窗口的大小和位置应与其他窗口无关,即使最初的大小或位置是相对于其他窗口计算的。

对于 RPRTO 条目,如果它们是嵌套在 MH 字典中的,则应视为浮动窗口参数对象(因此也视为媒体屏幕参数对象)不可行;如果它们嵌套在 BE 字典中,则应视为具有默认值。


表 284 – 浮动窗口参数字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 FWParams,表示浮动窗口参数字典。
D 数组(array) (必需)一个数组,包含两个非负整数,分别表示浮动窗口的宽度和高度(单位为像素)。这些值应对应媒体播放所在矩形的尺寸,不包括如标题栏和调整大小手柄等项目。
RT 整数(integer) (可选)浮动窗口相对于哪个窗口定位:
0   文档窗口
1   应用程序窗口
2   完全虚拟桌面
3   在媒体屏幕参数 MHBE 字典中由 M 指定的显示器(见 [9.22])
默认值:0。
P 整数(integer) (可选)浮动窗口(包括标题栏和调整大小手柄等项目)相对于 RT 指定的窗口的位置:
0   左上角
1   上居中
2   右上角
3   左居中
4   中心
5   右居中
6   左下角
7   下居中
8   右下角
默认值:4。
O 整数(integer) (可选)如果浮动窗口完全或部分位于屏幕外(即在任何物理显示器上不可见),应发生什么情况:
0   不采取特殊措施
1   移动和/或调整窗口大小,使其显示在屏幕上
2   将对象视为不可行
默认值:1。
T 布尔值(boolean) (可选)如果为 true,浮动窗口应具有标题栏。默认值:true。
UC 布尔值(boolean) (可选;仅当 Ttrue 时有效)如果为 true,浮动窗口应包含允许用户关闭浮动窗口的用户界面元素。默认值:true
R 整数(integer) (可选)指定用户是否可以调整浮动窗口的大小:
0   不允许调整大小
1   仅在保持纵横比的情况下允许调整大小
2   允许调整大小而不保持纵横比
默认值:0。
TT 数组(array) (可选;仅当 Ttrue 时有效)一个数组,提供在浮动窗口标题栏上显示的文本。参见 14.9.2.4,“多语言文本数组”。如果此条目不存在,符合规范的阅读器可以提供默认文本。

A media screen parameters dictionary (see Table 282) shall specify where a media object should be played. It shall contain MH and BE dictionaries (see Table 283), which shall function as discussed in 13.2.2, “Viability.” All media clips that are being played shall be associated with a particular document and shall be stopped when the document is closed.

NOTE

Conforming readers should disallow floating windows and full-screen windows unless specifically allowed by the user. The reason is that document-based security attacks are possible if windows containing arbitrary media content can be displayed without indicating to the user that the window is merely hosting a media object. This recommendation may be relaxed if it is possible to communicate the nature of such windows to the user; for example, with text in a floating window’s title bar.

Table 282 – Entries in a media screen parameters dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaScreenParams for a media screen parameters dictionary.
MH dictionary (Optional) A dictionary whose entries (see Table 283) shall be honoured for the media screen parameters to be considered viable.
BE dictionary (Optional) A dictionary whose entries (see Table 283) should be honoured.

Table 282 – Entries in a media screen parameters dictionary
Key Type Value
W integer (Optional) The type of window that the media object shall play in:
0   A floating window
1   A full-screen window that obscures all other windows
2   A hidden window
3   The rectangle occupied by the screen annotation (see 12.5.6.18, “Screen Annotations”) associated with the media rendition
Default value: 3. Unrecognized value in MH: object is non-viable; in BE: treat as default value.
B array (Optional) An array of three numbers in the range 0.0 to 1.0 that shall specify the components in the DeviceRGB colour space of the background colour for the rectangle in which the media is being played. This colour shall be used if the media object does not entirely cover the rectangle or if it has transparent sections. It shall be ignored for hidden windows.
Default value: implementation-defined. The conforming reader should choose a reasonable value based on the value of W.
EXAMPLE 1   A system default background colour for floating windows or a user-preferred background colour for full-screen windows.
If a media format has an intrinsic background colour, B shall not override it. However, the B colour shall be visible if the media has transparent areas or otherwise does not cover the entire window.
O number (Optional) A number in the range 0.0 to 1.0 specifying the constant opacity value that shall be used in painting the background colour specified by B. A value below 1.0 means the window shall be transparent.
EXAMPLE 2   Windows behind a floating window show through if the media does not cover the entire floating window.
A value of 0.0 shall indicate full transparency and shall make B irrelevant. It shall be ignored for full-screen and hidden windows.
Default value: 1.0 (fully opaque).
M integer (Optional) A monitor specifier (see Table 293) that shall specify which monitor in a multi-monitor system, a floating or full-screen window shall appear on. Ignored for other types.
Default value: 0 (document monitor). Unrecognized value in MH: object is non-viable; in BE: treat as default value.
F dictionary (Required if the value of W is 0; otherwise ignored) A floating window parameters dictionary (see Table 284) that shall specify the size, position, and options used in displaying floating windows.

The F entry in the media screen parameters MH/BE dictionaries shall be a floating window parameters dictionary, whose entries are listed in Table 284. The entries in the floating window parameters dictionary shall be treated as if they were present in the MH or BE dictionaries that they are referenced from. That is, the contained entries shall be individually evaluated for viability rather than the dictionary being evaluated as a whole. (There may be an F entry in both MH and BE. In such a case, if a given entry is present in both floating window parameters dictionaries, the one in the MH dictionary shall take precedence.)

The D, P, and RT entries shall be used to specify the rectangle that the floating window occupies. Once created, the floating window’s size and position shall not be tied to any other window, even if the initial size or position was computed relative to other windows.

Unrecognized values for the R, P, RT, and O entries shall be handled as follows: if they are nested within an MH dictionary, the floating window parameters object (and hence the media screen parameters object) shall be considered non-viable; if they are nested within a BE dictionary, they shall be considered to have their default values.

Table 284 – Entries in a floating window parameters dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be FWParams for a floating window parameters dictionary.
D array (Required) An array containing two non-negative integers that shall represent the floating window’s width and height, in pixels, respectively. These values shall correspond to the dimensions of the rectangle in which the media shall play, not including such items as title bar and resizing handles.
RT integer (Optional) The window relative to which the floating window shall be positioned:
0   The document window
1   The application window
2   The full virtual desktop
3   The monitor specified by M in the media screen parameters MH or BE dictionary (see 9.22)
Default value: 0.
P integer (Optional) The location where the floating window (including such items as title bar and resizing handles) shall be positioned relative to the window specified by RT:
0   Upper-left corner
1   Upper center
2   Upper-right corner
3   Center left
4   Center
5   Center right
6   Lower-left corner
7   Lower center
8   Lower-right corner
Default value: 4.
O integer (Optional) Specifies what shall occur if the floating window is positioned totally or partially offscreen (that is, not visible on any physical monitor):
0   Take no special action
1   Move and/or resize the window so that it is on-screen
2   Consider the object to be non-viable
Default value: 1
T boolean (Optional) If true, the floating window shall have a title bar. Default value: true.
UC boolean (Optional; meaningful only if T is true) If true, the floating window shall include user interface elements that allow a user to close a floating window. Default value: true
R integer (Optional) Specifies whether the floating window may be resized by a user:
0   May not be resized
1   May be resized only if aspect ratio is preserved
2   May be resized without preserving aspect ratio
Default value: 0.
TT array (Optional; meaningful only if T is true) An array providing text to display on the floating window’s title bar. See 14.9.2.4, “Multi-language Text Arrays.” If this entry is not present, the conforming reader may provide default text.

13.2.6.2 媒体偏移词典

13.2.6.2 Media Offset Dictionary

媒体偏移字典(表 285)应指定进入媒体对象的偏移量。S(子类型)条目指示偏移量的指定方式:可以是时间、帧或标记。不同的媒体类型支持不同类型的偏移量。

示例

Time, “10 seconds”; frames, “frame 20”; markers, “Chapter One.”

时间,“10秒”;帧,“帧 20”;标记,“章节一”。


表 285 – 所有媒体偏移字典中的共同条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaOffset,表示媒体偏移字典。
S 名称(name) (必需)媒体偏移字典的子类型。有效值应为:
T   媒体偏移时间字典(见 表 286
F   媒体偏移帧字典(见 表 287
M   媒体偏移标记字典(见 表 288
如果符合规范的阅读器无法识别此条目的值,则该呈现应视为不可行。


表 286 – 媒体偏移时间字典中的附加条目
键(Key) 类型(Type) 值(Value)
T 字典(dictionary) (必需)一个时间跨度字典(见 表 289),指定进入媒体对象的时间偏移量。在此上下文中,不允许负时间跨度。如果时间跨度字典不可行,则媒体偏移时间字典也不可行。


表 287 – 媒体偏移帧字典中的附加条目
键(Key) 类型(Type) 值(Value)
F 整数(integer) (必需)应指定媒体对象中的帧。帧编号从 0 开始;不允许使用负帧编号。


表 288 – 媒体偏移标记字典中的附加条目
键(Key) 类型(Type) 值(Value)
M 文本字符串(text string) (必需)一个文本字符串,用于标识媒体对象中的命名偏移。

A media offset dictionary (Table 285) shall specify an offset into a media object. The S (subtype) entry indicates how the offset shall be specified: in terms of time, frames or markers. Different media types support different types of offsets.

EXAMPLE

Time, “10 seconds”; frames, “frame 20”; markers, “Chapter One.”

Table 285 – Entries common to all media offset dictionaries
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaOffset for a media offset dictionary.
S name (Required) The subtype of media offset dictionary. Valid values shall be:
T   A media offset time dictionary (see Table 286)
F   A media offset frame dictionary (see Table 287)
M   A media offset marker dictionary (see Table 288)
The rendition shall be considered non-viable if the conforming reader does not recognize the value of this entry.

Table 286 – Additional entries in a media offset time dictionary
Key Type Value
T dictionary (Required) A timespan dictionary (see Table 289) that shall specify a temporal offset into a media object. Negative timespans are not allowed in this context. The media offset time dictionary is non-viable if its timespan dictionary is non-viable.

Table 287 – Additional entries in a media offset frame dictionary
Key Type Value
F integer (Required) Shall specify a frame within a media object. Frame numbers begin at 0; negative frame numbers are not allowed.

Table 288 – Additional entries in a media offset marker dictionary
Key Type Value
M text string (Required) A text string that identifies a named offset within a media object.

13.2.6.3 时间跨度词典

13.2.6.3 Timespan Dictionary

时间跨度字典应指定时间长度;其条目如表 289 所示。


表 289 – 时间跨度字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 Timespan,表示时间跨度字典。
S 名称(name) (必需)时间跨度字典的子类型。其值应为 S(简单时间跨度)。如果符合规范的阅读器无法识别此条目的值,则该呈现应视为不可行。
V 数字(number) (必需)时间跨度中的秒数。允许使用非整数值。负值是允许的,但在某些上下文中可能不允许。
(PDF 1.5)不允许负值。
此条目仅在 S 条目的值为 S 时使用。未来定义的子类型不必使用此条目。

A timespan dictionary shall specify a length of time; its entries are shown in Table 289.

Table 289 – Entries in a timespan dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be Timespan for a timespan dictionary.
S name (Required) The subtype of timespan dictionary. The value shall be S (simple timespan). The rendition shall be considered non-viable if the conforming reader does not recognize the value of this entry.
V number (Required) The number of seconds in the timespan. Non-integral values shall be allowed. Negative values shall be allowed, but may be disallowed in some contexts.
(PDF 1.5) Negative values are not allowed.
This entry shall be used only if the value of the S entry is S. Subtypes defined in the future need not use this entry.

13.2.7 其他多媒体对象

13.2.7 Other Multimedia Objects

13.2.7.1 概述

13.2.7.1 General

本小节定义了几种由前面小节引用的字典类型。

This sub-clause defines several dictionary types that are referenced by the previous sub-clauses.

13.2.7.2 媒体播放器词典

13.2.7.2 Media Players Dictionary

媒体播放器字典可由媒体剪辑数据(见 13.2.4.2,"媒体剪辑数据")和媒体播放参数(见 13.2.5,"媒体播放参数")字典引用,并应允许它们指定哪些播放器可以或不能用于播放关联的媒体。媒体播放器字典引用了媒体播放器信息字典(见 13.2.7.3,"媒体播放器信息字典"),这些字典应提供有关每个播放器的具体信息。


表 290 – 媒体播放器字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaPlayers,表示媒体播放器字典。
MU 数组(array) (可选)一个媒体播放器信息字典的数组(见 表 291),应指定一组播放器,必须在这些播放器中选择一个来播放关联的媒体对象。
NU 中指定的任何播放器将有效地从 MU 中移除。
示例   如果 MU 指定了播放器的第 1 到 5 版本,而 NU 指定了同一播放器的第 1 和 2 版本,则 MU 实际上是第 3 到 5 版本。
A 数组(array) (可选)一个媒体播放器信息字典的数组(见 表 291),应指定一组播放器,任何一个都可以用于播放关联的媒体对象。如果 MU 也存在并且非空,则应忽略 A
NU 数组(array) (可选)一个媒体播放器信息字典的数组(见 表 291),应指定一组不能用于播放关联媒体对象的播放器(即使它们也在 MU 中指定)。

MUANU 条目每个应指定一个或多个媒体播放器信息字典。空数组应视为未出现。媒体播放器信息字典应允许指定重叠的播放器范围。

注释 1

MU 可以包含一个描述 Player X 的第 1 到 10 版本的媒体播放器信息字典,还可以包含另一个描述 Player X 第 3 到 5 版本的字典。

如果 MUNUA 引用一个不可行的媒体播放器信息字典,它应视为未出现在其原始数组中,并且一个包含相同软件标识符字典的媒体播放器信息字典(见 13.2.7.4,"软件标识符字典")应在逻辑上视为存在于 NU 中。同样的规则也适用于包含部分未识别的的软件标识符字典的媒体播放器信息字典。

由于媒体剪辑数据和媒体播放参数字典可能都在播放操作中使用,并且每个字典都可能引用一个媒体播放器字典,因此这两个媒体播放器字典的内容之间可能会发生冲突。在播放时,查看器应使用以下算法来确定机器上是否可以使用播放器。如果满足以下任何条件,则无法使用该播放器:

算法:媒体播放器

a) 内容类型已知且播放器不支持该类型。
b) 该播放器在任一字典的 NU 数组中找到。
c) 两个字典都有非空的 MU 数组且播放器不在两者中找到,或只有一个字典有非空的 MU 数组且播放器不在其中找到。
d) 两个字典都没有非空的 MU 数组,内容类型未知,并且播放器没有出现在任何字典的 A 数组中。

如果没有满足上述任何条件,则可以使用该播放器。

注释 2

如果播放器与一个条目的 PID 条目中的信息匹配,则该播放器在 NUMUA 数组中“找到”,如 13.2.7.4 中的算法所述,"软件标识符字典"。

A media players dictionary may be referenced by media clip data (see 13.2.4.2, “Media Clip Data”) and media play parameters (see 13.2.5, “Media Play Parameters”) dictionaries, and shall allow them to specify which players may or may not be used to play the associated media. The media players dictionary references media player info dictionaries (see 13.2.7.3, “Media Player Info Dictionary”) that shall provide specific information about each player.

Table 290 – Entries in a media players dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaPlayers for a media players dictionary.
MU array (Optional) An array of media player info dictionaries (see Table 291) that shall specify a set of players, one of which shall be used in playing the associated media object.
Any players specified in NU are effectively removed from MU.
EXAMPLE   If MU specifies versions 1 through 5 of a player and NU specifies versions 1 and 2 of the same player, MU is effectively versions 3 through 5.
A array (Optional) An array of media player info dictionaries (see Table 291) that shall specify a set of players, any of which may be used in playing the associated media object. If MU is also present and non-empty, A shall be ignored.
NU array (Optional) An array of media player info dictionaries (see Table 291) that shall specify a set of players that shall not be used in playing the associated media object (even if they are also specified in MU).

The MU, A, and NU entries each shall specify one or more media player info dictionaries. An empty array shall be treated as if it is not present. The media player info dictionaries shall be allowed to specify overlapping player ranges.

NOTE 1

MU could contain a media player info dictionary describing versions 1 to 10 of Player X and another describing versions 3 through 5 of Player X.

If a non-viable media player info dictionary is referenced by MU, NU, or A, it shall be treated as if it were not present in its original array, and a media player info dictionary containing the same software identifier dictionary (see 13.2.7.4, “Software Identifier Dictionary”) shall logically considered present in NU. The same rule shall apply to a media player info dictionary that contains a partially unrecognized software identifier dictionary.

Since both media clip data and media play parameters dictionaries may be employed in a play operation, and each may reference a media players dictionary, there is a potential for conflict between the contents of the two media players dictionaries. At play-time, the viewer shall use the following algorithm to determine whether a player present on the machine may be employed. The player may not be used if any of the following conditions are true:

Algorithm: Media Player

a) The content type is known and the player does not support the type. b) The player is found in the NU array of either dictionary. c) Both dictionaries have non-empty MU arrays and the player is not found in both of them, or only one of the dictionaries has a non-empty MU array and the player is not found in it. d) Neither dictionary has a non-empty MU array, the content type is not known, and the player is not found in the A array of either dictionary.

If none of the conditions are true, the player may be used.

NOTE 2

A player is “found” in the NU, MU, or A arrays if it matches the information found in the PID entry of one of the entries, as described by the Algorithm in 13.2.7.4, “Software Identifier Dictionary.”

13.2.7.3 媒体播放器信息词典

13.2.7.3 Media Player Info Dictionary

媒体播放器信息字典应提供有关特定媒体播放器的各种信息。其条目(见表 291)应将信息与播放器的特定版本或版本范围关联。从 PDF 1.5 开始,只有 PID 条目提供有关播放器的信息,如下一个子条款 13.2.7.4 “软件标识符字典” 中所述。


表 291 – 媒体播放器信息字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 MediaPlayerInfo,表示媒体播放器信息字典。
PID 字典(dictionary) (必需)一个软件标识符字典(见 13.2.7.4,“软件标识符字典”),应指定适用于此媒体播放器信息字典的播放器名称、版本和操作系统。
MH 字典(dictionary) (可选)一个字典,包含必须遵守的条目,以使此字典被视为可行。
当前,对于此字典没有定义条目。
BE 字典(dictionary) (可选)一个字典,包含仅需“尽力而为”遵守的条目。
当前,对于此字典没有定义条目。

A media player info dictionary shall provide a variety of information regarding a specific media player. Its entries (see Table 291) shall associate information with a particular version or range of versions of a player. As of PDF 1.5, only the PID entry shall provide information about the player, as described in the next sub-clause, 13.2.7.4, “Software Identifier Dictionary.”

Table 291 – Entries in a media player info dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be MediaPlayerInfo for a media player info dictionary.
PID dictionary (Required) A software identifier dictionary (see 13.2.7.4, “Software Identifier Dictionary”) that shall specify the player name, versions, and operating systems to which this media player info dictionary applies.
MH dictionary (Optional) A dictionary containing entries that shall be honored for this dictionary to be considered viable.
Currently, there are no defined entries for this dictionary
BE dictionary (Optional) A dictionary containing entries that need only be honored in a “best effort” sense.
Currently, there are no defined entries for this dictionary

13.2.7.4 软件标识符词典

13.2.7.4 Software Identifier Dictionary

13.2.7.4.1 概述

13.2.7.4.1 General

软件标识符字典 应允许通过名称、版本范围和操作系统来标识软件;其条目列在 表 292 中。符合要求的阅读器使用这些信息来确定在特定情况下是否可以使用给定的媒体播放器。如果字典包含符合要求的阅读器无法识别的键,则应视为部分被识别。符合要求的阅读器可以根据使用上下文决定是否将该软件标识符视为可行。

以下程序应用于确定一款软件是否与软件标识符字典匹配:

算法:软件标识符

a) 软件名称应与 U 条目中指定的名称匹配(见 13.2.7.4,“软件标识符字典”中的 “软件 URI”)。 b) 软件版本应位于 LHLIH1 条目指定的区间内(见 13.2.7.4,“软件标识符字典”中的 “版本数组”)。 c) 机器的操作系统名称应与 OS 数组中存在的一个值完全匹配。如果该数组不存在或为空,也应视为匹配。


表 292 – 软件标识符字典中的条目
键(Key) 类型(Type) 值(Value)
Type 名称(name) (可选)此字典描述的 PDF 对象类型;如果存在,应为 SoftwareIdentifier,表示软件标识符字典。
U ASCII 字符串(ASCII string) (必需)标识一款软件的 URI(见 13.2.7.4,“软件标识符字典”中的“软件 URI”)。
L 数组(array) (可选)此软件标识符字典指定的版本范围的下限(见 13.2.7.4,“软件标识符字典”中的“版本数组”)。默认值:数组 [0]。
LI 布尔值(boolean) (可选)如果为 true,则 LH 定义的区间下限是包含的;也就是说,软件版本应大于或等于 L(见 13.2.7.4,“软件标识符字典”中的“版本数组”)。如果为 false,则不包含。默认值:true
H 数组(array) (可选)此软件标识符字典指定的版本范围的上限(见 13.2.7.4,“软件标识符字典”中的“版本数组”)。默认值:空数组 []。
HI 布尔值(boolean) (可选)如果为 true,则 LH 定义的区间上限是包含的;也就是说,软件版本应小于或等于 H(见 13.2.7.4,“软件标识符字典”中的“版本数组”)。如果为 false,则不包含。默认值:true
OS 数组(array) (可选)一个字节字符串数组,表示操作系统标识符,指示此对象适用的操作系统。定义的值与 SMIL 2.0 的 systemOperatingSystem 属性中定义的相同。数组中不能有相同标识符的多个副本。空数组应视为代表所有操作系统。默认值:空数组。

A software identifier dictionary shall allow software to be identified by name, range of versions, and operating systems; its entries are listed in Table 292. A conforming reader uses this information to determine whether a given media player may be used in a given situation. If the dictionary contains keys that are unrecognized by the conforming reader, it shall be considered to be partially recognized. The conforming reader may or may not decide to treat the software identifier as viable, depending on the context in which it is used.

The following procedure shall be used to determine whether a piece of software is considered to match a software identifier dictionary:

Algorithm: Software identifier

a)The software name shall match the name specified by the U entry (see “Software URIs” in 13.2.7.4, “Software Identifier Dictionary”). b)The software version shall be within the interval specified by the L, H, LI, and H1 entries (see “Version arrays” in 13.2.7.4, “Software Identifier Dictionary”). c)The machine’s operating system name shall be an exact match for one present in the OS array. If the array is not present or empty, a match shall also be considered to exist.

Table 292 – Entries in a software identifier dictionary
Key Type Value
Type name (Optional) The type of PDF object that this dictionary describes; if present, shall be SoftwareIdentifier for a software identifier dictionary.
U ASCII string (Required) A URI that identifies a piece of software (see “Software URIs” in 13.2.7.4, “Software Identifier Dictionary”).
L array (Optional) The lower bound of the range of software versions that this software identifier dictionary specifies (see “Version arrays” in 13.2.7.4, “Software Identifier Dictionary”). Default value: the array [0].
LI boolean (Optional) If true, the lower bound of the interval defined by L and H is inclusive; that is, the software version shall be greater than or equal to L (see “Version arrays” in 13.2.7.4, “Software Identifier Dictionary”). If false, it shall not be inclusive. Default value: true.
H array (Optional) The upper bound of the range of software versions that this software identifier dictionary specifies (see “Version arrays” in 13.2.7.4, “Software Identifier Dictionary”). Default value: an empty array [].
HI boolean (Optional) If true, the upper bound of the interval defined by L and H is inclusive; that is, the software version shall be less than or equal to H (see “Version arrays” in 13.2.7.4, “Software Identifier Dictionary”). If false, it shall not be inclusive. Default value: true.
OS array (Optional) An array of byte strings representing operating system identifiers that shall indicate to which operating systems this object applies. The defined values are the same as those defined for SMIL 2.0’s systemOperatingSystem attribute. There may not be multiple copies of the same identifier in the array. An empty array shall be considered to represent all operating systems. Default value: an empty array.

13.2.7.4.2 软件 URI

13.2.7.4.2 Software URIs

U 条目是一个 URI(统一资源标识符),用于标识一款软件。它应根据其方案进行解释;目前唯一定义的方案是 vnd.adobe.swname。方案名称不区分大小写;如果符合要求的阅读器无法识别该方案,则该软件应视为不匹配。此方案的 URI 语法为:

“vnd.adobe.swname:” software_name

其中,软件名称 应为根据 Internet RFC 2396 中定义的 reg_name 格式, Uniform Resource Identifiers (URI): Generic Syntax;请参见 参考文献软件名称 应为一系列经过一次 URL 编码的 UTF-8 字符(参见 14.10.3.2,“URL 字符串”)。也就是说,为了恢复原始的软件名称,软件名称 应先进行解码,然后视为 UTF-8 字符序列。实际的软件名称应进行区分大小写的比较。

软件名称应为二类名称(参见 附录 E)。

示例

Adobe Acrobat 的 URI 是:

vnd.adobe.swname:ADBE_Acrobat

The U entry is a URI (universal resource identifier) that identifies a piece of software. It shall be interpreted according to its scheme; the only presently defined scheme is vnd.adobe.swname. The scheme name is case-insensitive; if shall not be recognized by the conforming reader, the software shall be considered a non-match. The syntax of URIs of this scheme is

“vnd.adobe.swname:” software_name

where software_name shall be reg_name as defined in Internet RFC 2396, Uniform Resource Identifiers (URI): Generic Syntax; see the Bibliography. software_name shall be a sequence of UTF-8-encoded characters that have been escaped with one pass of URL escaping (see 14.10.3.2, “URL Strings”). That is, to recover the original software name, software_name shall be unescaped and then treated as a sequence of UTF-8 characters. The actual software names shall be compared in a case-sensitive fashion.

Software names shall be second-class names (see Annex E).

EXAMPLE

The URI for Adobe Acrobat is

vnd.adobe.swname:ADBE_Acrobat

13.2.7.4.3 版本数组

13.2.7.4.3 Version arrays

LHLIHI 条目用于指定软件版本的范围。LH 应为版本数组,其中包含零个或多个非负整数,表示子版本号。第一个整数应为主版本号,随后的整数应按顺序为次版本号。H 应大于或等于 L,版本数组比较规则如下:

算法:比较版本数组

a) 空版本数组应视为无穷大;即,它应被认为大于任何其他版本数组,除了另一个空数组。两个空数组相等。

b) 当比较包含不同元素数量的数组时,较小的数组应隐式地用零值整数填充,以使元素数量相等。

示例

比较 [5 1 2 3 4] 和 [5] 时,后者被视为 [5 0 0 0 0]。

c) 数组的对应元素应从第一个开始进行比较。当发现差异时,包含较大元素的数组应被认为具有较大的版本号。如果没有发现差异,则版本相等。

如果版本数组包含负数,则应视为不可行,包含它的软件标识符也是如此。

The L, H, LI, and HI entries shall be used to specify a range of software versions. L and H shall be version arrays containing zero or more non-negative integers representing subversion numbers. The first integer shall be the major version numbers, and subsequent integers shall be increasingly minor. H shall be greater than or equal to L, according to the following rules for comparing version arrays:

Algorithm: Comparing version arrays

a) An empty version array shall be treated as infinity; that is, it shall be considered greater than any other version array except another empty array. Two empty arrays are equal.

b) When comparing arrays that contain different numbers of elements, the smaller array shall be implicitly padded with zero-valued integers to make the number of elements equal.

EXAMPLE

When comparing [5 1 2 3 4] to [5], the latter is treated as [5 0 0 0 0].

c) The corresponding elements of the arrays shall be compared, starting with the first. When a difference is found, the array containing the larger element shall be considered to have the larger version number. If no differences are found, the versions are equal.

If a version array contains negative numbers, it shall be considered non-viable, as is the enclosing software identifier.

13.2.7.5 监视器说明符

13.2.7.5 Monitor Specifier

监视器标识符 是一个整数,用于标识连接到系统的物理监视器。它可以具有表 293 中的一个值:

表 293 – 监视器标识符值
描述
0 包含文档窗口最大部分的监视器
1 包含文档窗口最小部分的监视器
2 主监视器。如果没有监视器被视为主监视器,则视为情况 0
3 具有最大色深的监视器
4 具有最大面积(以像素平方计)的监视器
5 具有最大高度(以像素计)的监视器
6 具有最大宽度(以像素计)的监视器

对于其中的一些值,在播放时可能会出现“平局”的情况;例如,两个监视器可能具有相同的色深。平局可以通过依赖于实现的方式来打破。

A monitor specifier is an integer that shall identify a physical monitor attached to a system. It may have one of the values in Table 293:

Table 293 – Monitor specifier values
Value Description
0 The monitor containing the largest section of the document window
1 The monitor containing the smallest section of the document window
2 Primary monitor. If no monitor is considered primary, shall treat as case 0
3 Monitor with the greatest colour depth
4 Monitor with the greatest area (in pixels squared)
5 Monitor with the greatest height (in pixels)
6 Monitor with the greatest width (in pixels)

For some of these values, it is possible have a “tie” at play-time; for example, two monitors might have the same colour depth. Ties may be broken in an implementation-dependent manner.