57 private $available_filters = array(
'ASCIIHexDecode',
'ASCII85Decode',
'LZWDecode',
'FlateDecode',
'RunLengthDecode');
68 return $this->available_filters;
81 case 'ASCIIHexDecode': {
85 case 'ASCII85Decode': {
97 case 'RunLengthDecode': {
101 case 'CCITTFaxDecode': {
105 case 'JBIG2Decode': {
156 $eod = strpos(
$data,
'>');
157 if ($eod !==
false) {
163 $data_length = strlen(
$data);
164 if (($data_length % 2) != 0) {
170 $this->
Error(
'decodeASCIIHex: invalid code');
174 if (preg_match(
'/[^a-fA-F\d]/',
$data) > 0) {
175 $this->
Error(
'decodeASCIIHex: invalid code');
178 $decoded = pack(
'H*',
$data);
196 if (strpos(
$data,
'<~') !==
false) {
201 $eod = strpos(
$data,
'~>');
202 if ($eod !==
false) {
207 $data_length = strlen(
$data);
209 if (preg_match(
'/[^\x21-\x75,\x74]/',
$data) > 0) {
210 $this->
Error(
'decodeASCII85: invalid code');
213 $zseq = chr(0).chr(0).chr(0).chr(0);
217 $pow85 = array((85*85*85*85), (85*85*85), (85*85), 85, 1);
218 $last_pos = ($data_length - 1);
220 for (
$i = 0;
$i < $data_length; ++
$i) {
224 if ($group_pos == 0) {
227 $this->
Error(
'decodeASCII85: invalid code');
231 $tuple += (($char - 33) * $pow85[$group_pos]);
232 if ($group_pos == 4) {
233 $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8).chr($tuple);
241 if ($group_pos > 1) {
242 $tuple += $pow85[($group_pos - 1)];
245 switch ($group_pos) {
247 $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8);
251 $decoded .= chr($tuple >> 24).chr($tuple >> 16);
255 $decoded .= chr($tuple >> 24);
259 $this->
Error(
'decodeASCII85: invalid code');
278 $data_length = strlen(
$data);
281 for (
$i = 0;
$i < $data_length; ++
$i) {
282 $bitstring .= sprintf(
'%08b', ord(
$data{
$i}));
285 $data_length = strlen($bitstring);
291 $dictionary = array();
292 for (
$i = 0;
$i < 256; ++
$i) {
293 $dictionary[
$i] = chr(
$i);
298 while (($data_length > 0) AND (($index = bindec(substr($bitstring, 0, $bitlen))) != 257)) {
300 $bitstring = substr($bitstring, $bitlen);
302 $data_length -= $bitlen;
310 $dictionary = array();
311 for (
$i = 0;
$i < 256; ++
$i) {
312 $dictionary[
$i] = chr(
$i);
314 }
elseif ($prev_index == 256) {
316 $decoded .= $dictionary[$index];
317 $prev_index = $index;
322 $decoded .= $dictionary[$index];
323 $dic_val = $dictionary[$prev_index].$dictionary[$index]{0};
325 $prev_index = $index;
328 $dic_val = $dictionary[$prev_index].$dictionary[$prev_index]{0};
329 $decoded .= $dic_val;
332 $dictionary[$dix] = $dic_val;
357 $decoded = gzuncompress(
$data);
358 if ($decoded ===
false) {
359 $this->
Error(
'decodeFlate: invalid code');
375 $data_length = strlen(
$data);
377 while(
$i < $data_length) {
386 $decoded .= substr(
$data, (
$i + 1), ($byte + 1));
392 $decoded .= str_repeat(
$data{(
$i + 1)}, (257 - $byte));
470 die(
'<strong>TCPDF_FILTERS ERROR: </strong>'.$msg);
foreach(array('date1', 'date2', 'type', 'renewals', 'width') as $item) $data
decodeFilter($filter, $data)
Decode data using the specified filter type.
decodeFilterFlateDecode($data)
FlateDecode Decompresses data encoded using the zlib/deflate compression method, reproducing the orig...
decodeFilterJBIG2Decode($data)
JBIG2Decode (NOT IMPLEMETED) Decompresses data encoded using the JBIG2 standard, reproducing the orig...
decodeFilterStandard($data)
Standard Default decoding filter (leaves data unchanged).
decodeFilterCCITTFaxDecode($data)
CCITTFaxDecode (NOT IMPLEMETED) Decompresses data encoded using the CCITT facsimile standard...
This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters).
decodeFilterDCTDecode($data)
DCTDecode (NOT IMPLEMETED) Decompresses data encoded using a DCT (discrete cosine transform) techniqu...
decodeFilterLZWDecode($data)
LZWDecode Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method...
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
Error($msg)
This method is automatically called in case of fatal error; it simply outputs the message and halts t...
decodeFilterASCII85Decode($data)
ASCII85Decode Decodes data encoded in an ASCII base-85 representation, reproducing the original binar...
decodeFilterRunLengthDecode($data)
RunLengthDecode Decompresses data encoded using a byte-oriented run-length encoding algorithm...
decodeFilterJPXDecode($data)
JPXDecode (NOT IMPLEMETED) Decompresses data encoded using the wavelet-based JPEG2000 standard...
getAvailableFilters()
Get a list of available decoding filters.
decodeFilterCrypt($data)
Crypt (NOT IMPLEMETED) Decrypts data encrypted by a security handler, reproducing the data as it was ...
decodeFilterASCIIHexDecode($data)
ASCIIHexDecode Decodes data encoded in an ASCII hexadecimal representation, reproducing the original ...