class final Core · roukmoute/pdf 0.6.2
PDF\Graphics\XObjects\AlternateImageAlternative image declaration; alternatives cannot recursively define alternatives.Inheritance and contracts
Parent : PDF\Specification\SchemaDictionary
Interfaces : Countable, IteratorAggregate, PDF\Syntax\FileStructure\BasicType, Stringable, Traversable
Definition in the specification
Table 91 · Entries in an Alternate Image Dictionary
ISO 32000-1:2008, §8.9.5.4 · PDF page 220 ↗
| Entry | PDF type | Source requirement | Table |
|---|---|---|---|
/Image | stream | Required | 91 |
/DefaultForPrinting | boolean | Optional | 91 |
/OC | dictionary | Optional; PDF 1.5 | 91 |
Conditional descriptions remain traceable. A definition alone does not implement a codec, a signature or every format mechanism. Read the coverage.
Construction
__construct()
public function __construct(PDF\Graphics\XObjects\ImageXObject|PDF\Graphics\XObjects\EncodedImageXObject|PDF\Graphics\XObjects\ImageMask $image, PDF\Syntax\Object\BooleanType $defaultForPrinting = new BooleanType(false), ?PDF\Graphics\OptionalContent\OptionalContentObject $optionalContent = null)Declared methods
with()
public function with(PDF\Syntax\Object\DictionaryObject\Entry $entry): staticwithout()
public function without(PDF\Syntax\Object\NameType|string $key): staticInherited methods
9 methods from parents and contracts
__toString()
public function __toString(): stringcount()
public function count(): intdefinition()
public function definition(): PDF\Specification\TableDefinitionentries()
public function entries(): iterable@return iterable<Entry>get()
public function get(PDF\Syntax\Object\NameType|string $key): ?PDF\Syntax\FileStructure\BasicTypegetIterator()
public function getIterator(): Traversablehas()
public function has(PDF\Syntax\Object\NameType|string $key): booltoPdf()
public function toPdf(PDF\Serialization\SerializationContext $context): stringvalidate()
public function validate(): voidChecks unconditional requirements; conditional and inherited rules remain explicit.Properties
| Declaration | Origin and documentation |
|---|---|
public readonly PDF\Syntax\Object\BooleanType $defaultForPrinting | PDF\Graphics\XObjects\AlternateImage |
public readonly PDF\Graphics\XObjects\ImageXObject|PDF\Graphics\XObjects\EncodedImageXObject|PDF\Graphics\XObjects\ImageMask $image | PDF\Graphics\XObjects\AlternateImage |
Constants
| Name | PHP value | Origin |
|---|---|---|
COMMON_TABLES | | PDF\Specification\SchemaDictionary |
TABLE | | PDF\Graphics\XObjects\AlternateImage |