CMapStream
extends PdfStream
in package
CMap stream (/Type /CMap) — ISO 32000-2 §9.7.5.4.
Maps character codes (bytes or multi-byte sequences) to CIDs for a CIDFont, or (in ToUnicode form) to Unicode code points. The stream body holds the CMap program text.
Attributes
- #[RequiresPdfVersion]
- \Phpdftk\Pdf\Core\PdfVersion::V1_4
Table of Contents
Constants
- PDF_TYPE = 'CMap'
Properties
- $cidSystemInfo : CIDSystemInfo|null
- $cMapName : PdfName|null
- $data : string
- $dictionary : PdfDictionary
- $generationNumber : int
- $objectNumber : int
- $useCMap : PdfName|PdfReference|null
- $wMode : int|null
Methods
- __construct() : mixed
- setFilter() : void
- Set a filter to encode/decode the stream data.
- toIndirectObject() : string
- Wrap the object in an indirect object structure: X Y obj ... endobj
- toPdf() : string
- Returns the stream body: dictionary, stream keyword, data, endstream.
Constants
PDF_TYPE
public
mixed
PDF_TYPE
= 'CMap'
Properties
$cidSystemInfo
public
CIDSystemInfo|null
$cidSystemInfo
= null
$cMapName
public
PdfName|null
$cMapName
= null
$data
public
string
$data
= ''
$dictionary
public
PdfDictionary
$dictionary
$generationNumber
public
int
$generationNumber
= 0
$objectNumber
public
int
$objectNumber
= 0
$useCMap
public
PdfName|PdfReference|null
$useCMap
= null
$wMode
public
int|null
$wMode
= null
Methods
__construct()
public
__construct([string $cMapProgram = '' ]) : mixed
Parameters
- $cMapProgram : string = ''
setFilter()
Set a filter to encode/decode the stream data.
public
setFilter(FilterInterface $filter, string $pdfFilterName) : void
Parameters
- $filter : FilterInterface
-
The filter implementation
- $pdfFilterName : string
-
The PDF filter name (e.g. 'FlateDecode', 'ASCII85Decode')
toIndirectObject()
Wrap the object in an indirect object structure: X Y obj ... endobj
public
toIndirectObject() : string
Return values
stringtoPdf()
Returns the stream body: dictionary, stream keyword, data, endstream.
public
toPdf() : string
/Length is injected into the dictionary at serialization time. If a filter is set, the data is encoded before writing.