phpdftk API Documentation

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

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
string

toPdf()

Serialize the object's dictionary/value to PDF syntax.

public toPdf() : string
Return values
string

        
On this page

Search results