OCG
extends PdfObject
in package
PDF Optional Content Group (ISO 32000-2 Table 96).
Represents a layer in the PDF document that can be shown or hidden.
Example: $ocg = new OCG('Watermark'); $writer->register($ocg);
Attributes
- #[RequiresPdfVersion]
- \Phpdftk\Pdf\Core\PdfVersion::V1_5
Table of Contents
Constants
- PDF_TYPE = 'OCG'
Properties
- $generationNumber : int
- $intent : PdfName|null
- $name : PdfName
- $objectNumber : int
- $usage : PdfDictionary|null
Methods
- __construct() : mixed
- toIndirectObject() : string
- Wrap the object in an indirect object structure: X Y obj ... endobj
- toPdf() : string
- Serialize the object's dictionary/value to PDF syntax.
Constants
PDF_TYPE
public
mixed
PDF_TYPE
= 'OCG'
Properties
$generationNumber
public
int
$generationNumber
= 0
$intent
public
PdfName|null
$intent
= null
$name
public
PdfName
$name
$objectNumber
public
int
$objectNumber
= 0
$usage
public
PdfDictionary|null
$usage
= null
Methods
__construct()
public
__construct(string $name) : mixed
Parameters
- $name : string
toIndirectObject()
Wrap the object in an indirect object structure: X Y obj ... endobj
public
toIndirectObject() : string
Return values
stringtoPdf()
Serialize the object's dictionary/value to PDF syntax.
public
toPdf() : string