Table of contents
Namespace: Com\Tecnick\Pdf\Encrypt
abstract class Output
Source: src/Output.php:73
Generates the PDF encryption dictionary.
Types
TEncryptData
array{
'CF': array{
'AuthEvent': string,
'CFM': string,
'EncryptMetadata': bool,
'Length': int,
},
'EFF': string,
'EncryptMetadata': bool,
'Filter': string,
'Length': int,
'O': string,
'OE': string,
'OKS': string,
'OVS': string,
'P': int,
'R': int,
'Recipients': array<string>,
'StmF': string,
'StrF': string,
'SubFilter': string,
'U': string,
'UE': string,
'UKS': string,
'UVS': string,
'V': int,
'encrypted': bool,
'fileid': string,
'key': string,
'mode': int,
'objid': int,
'owner_password': string,
'perms': string,
'protection': int,
'pubkey': bool,
'pubkeys'?: list<array{'c':string, 'p'?:array<string>}>,
'user_password': string,
}
Methods
__debugInfo()
Redact the file encryption key and the passwords when the object is dumped.
public __debugInfo(): array<string,mixed>
Returns: array<string,mixed>
Source: src/Output.php:131
escapeString()
Escape a string: add “" before “", “(” and “)”.
public escapeString(string $str): string
Parameters:
$str(string): String to escape.
Returns: string
Source: src/Output.php:146
getPdfEncryptionObj()
Get the PDF encryption block
public getPdfEncryptionObj(int &$pon): string
Parameters:
$pon(int): Current PDF object number
Returns: string
Throws:
- Exception: When encryption is not enabled.
Source: src/Output.php:186