setasign\SetaPDF2\Extractor
ContentStreamCleaner Helper class to clean up content streams.
File: /SetaPDF v2/Extractor/ContentStreamCleaner.php
Old class name (alias):
\SetaPDF_Extractor_ContentStreamCleaner
Class hierarchy
Summary
Constants
REGEX_COLORS
Constant defining a regex for color operators.
REGEX_PATHOPERATORS
Constant defining a regex for path operators.
TYPE_ALL
Constant defining all content types.
TYPE_INLINE_IMAGE
Constant defining a content type.
TYPE_NONE
Constant defining a content type.
TYPE_OPERATOR
Constant defining a content type.
TYPE_STRING
Constant defining a content type.
Static Methods
_strposa()
array $needles,
int $offset = 0
Searches for the closest needle in the string.
If there is no needle in the string, it will return false.
Parameters
- $haystack : string
- $needles : array
- $offset : int
clean()
Cleans a content stream string by using regexes on the chosen targets.
The regexes will NOT affect literal string objects.
Parameters
- $data : string|array
- $regexes : array
- $target : int
splitStream()
Splits a content stream string into literal strings, inline images and operators (all left).
The pieces offer information about their type.
Parameters
- $string : string
- $ignore : int