New upstream version 0.6.27
This commit is contained in:
23
share/pnp/application/vendor/fpdf/fpdf.php
vendored
23
share/pnp/application/vendor/fpdf/fpdf.php
vendored
@@ -232,31 +232,36 @@ function SetCompression($compress)
|
||||
function SetTitle($title, $isUTF8=false)
|
||||
{
|
||||
// Title of document
|
||||
$this->metadata['Title'] = $isUTF8 ? $title : utf8_encode($title);
|
||||
$this->metadata['Title'] = $isUTF8 ? $title : mb_convert_encoding($title, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($title);
|
||||
}
|
||||
|
||||
function SetAuthor($author, $isUTF8=false)
|
||||
{
|
||||
// Author of document
|
||||
$this->metadata['Author'] = $isUTF8 ? $author : utf8_encode($author);
|
||||
$this->metadata['Author'] = $isUTF8 ? $author : mb_convert_encoding($author, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($author);
|
||||
}
|
||||
|
||||
function SetSubject($subject, $isUTF8=false)
|
||||
{
|
||||
// Subject of document
|
||||
$this->metadata['Subject'] = $isUTF8 ? $subject : utf8_encode($subject);
|
||||
$this->metadata['Subject'] = $isUTF8 ? $subject : mb_convert_encoding($subject, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($subject);
|
||||
}
|
||||
|
||||
function SetKeywords($keywords, $isUTF8=false)
|
||||
{
|
||||
// Keywords of document
|
||||
$this->metadata['Keywords'] = $isUTF8 ? $keywords : utf8_encode($keywords);
|
||||
$this->metadata['Keywords'] = $isUTF8 ? $keywords : mb_convert_encoding($keywords, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($keywords);
|
||||
}
|
||||
|
||||
function SetCreator($creator, $isUTF8=false)
|
||||
{
|
||||
// Creator of document
|
||||
$this->metadata['Creator'] = $isUTF8 ? $creator : utf8_encode($creator);
|
||||
$this->metadata['Creator'] = $isUTF8 ? $creator : mb_convert_encoding($creator, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($creator);
|
||||
}
|
||||
|
||||
function AliasNbPages($alias='{nb}')
|
||||
@@ -1039,9 +1044,10 @@ protected function _dochecks()
|
||||
// Check mbstring overloading
|
||||
if(ini_get('mbstring.func_overload') & 2)
|
||||
$this->Error('mbstring overloading must be disabled');
|
||||
// magic quotes removed from php 7.4?
|
||||
// Ensure runtime magic quotes are disabled
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
//if(get_magic_quotes_runtime())
|
||||
// @set_magic_quotes_runtime(0);
|
||||
}
|
||||
|
||||
protected function _checkoutput()
|
||||
@@ -1168,7 +1174,8 @@ protected function _httpencode($param, $value, $isUTF8)
|
||||
if($this->_isascii($value))
|
||||
return $param.'="'.$value.'"';
|
||||
if(!$isUTF8)
|
||||
$value = utf8_encode($value);
|
||||
$value = mb_convert_encoding($value, 'UTF-8', mb_list_encodings());
|
||||
// utf8_encode($value);
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')!==false)
|
||||
return $param.'="'.rawurlencode($value).'"';
|
||||
else
|
||||
|
||||
6
share/pnp/application/vendor/fpdf/fpdi.php
vendored
6
share/pnp/application/vendor/fpdf/fpdi.php
vendored
@@ -558,8 +558,8 @@ class FPDI extends FPDF_TPL
|
||||
$this->_straightOut('<<');
|
||||
|
||||
reset ($value[1]);
|
||||
|
||||
while (list($k, $v) = each($value[1])) {
|
||||
|
||||
foreach($value[1] as $k => $v) {
|
||||
$this->_straightOut($k . ' ');
|
||||
$this->_writeValue($v);
|
||||
}
|
||||
@@ -690,4 +690,4 @@ class FPDI extends FPDF_TPL
|
||||
$parser->closeFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,9 @@ class fpdi_pdf_parser extends pdf_parser
|
||||
}
|
||||
|
||||
$res = $this->_getPageRotation($obj[1][1]['/Parent']);
|
||||
if (! is_array($res))
|
||||
return false;
|
||||
|
||||
if ($res[0] == pdf_parser::TYPE_OBJECT)
|
||||
return $res[1];
|
||||
|
||||
|
||||
@@ -384,8 +384,9 @@ function MakeDefinitionFile($file, $type, $enc, $embed, $subset, $map, $info)
|
||||
function MakeFont($fontfile, $enc='cp1252', $embed=true, $subset=true)
|
||||
{
|
||||
// Generate a font definition file
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(false);
|
||||
// magic quotes removed from php 7.4-ish
|
||||
//if(get_magic_quotes_runtime())
|
||||
// @set_magic_quotes_runtime(false);
|
||||
ini_set('auto_detect_line_endings', '1');
|
||||
|
||||
if(!file_exists($fontfile))
|
||||
|
||||
Reference in New Issue
Block a user