WhitespaceClean-resources/others

whitespace pass over files
for reference regex that was used s/[ \t]+(\r?\n)/\1/
This commit is contained in:
mafoo
2016-03-11 13:57:01 +00:00
parent 11c2176a15
commit 2b39287bdc
18 changed files with 166 additions and 166 deletions

View File

@@ -32,35 +32,35 @@ class fpdi_pdf_parser extends pdf_parser
* @var array
*/
protected $_pages;
/**
* Page count
*
* @var integer
*/
protected $_pageCount;
/**
* Current page number
*
* @var integer
*/
public $pageNo;
/**
* PDF version of imported document
*
* @var string
*/
public $_pdfVersion;
/**
* Available BoxTypes
*
* @var array
*/
public $availableBoxes = array('/MediaBox', '/CropBox', '/BleedBox', '/TrimBox', '/ArtBox');
/**
* The constructor.
*
@@ -75,11 +75,11 @@ class fpdi_pdf_parser extends pdf_parser
// Read pages
$this->_readPages($pages, $this->_pages);
// count pages;
$this->_pageCount = count($this->_pages);
}
/**
* Get page count from source file.
*
@@ -106,7 +106,7 @@ class fpdi_pdf_parser extends pdf_parser
$this->pageNo = $pageNo;
}
/**
* Get page-resources from current page
*
@@ -116,7 +116,7 @@ class fpdi_pdf_parser extends pdf_parser
{
return $this->_getPageResources($this->_pages[$this->pageNo]);
}
/**
* Get page-resources from a /Page dictionary.
*
@@ -158,14 +158,14 @@ class fpdi_pdf_parser extends pdf_parser
public function getContent()
{
$buffer = '';
if (isset($this->_pages[$this->pageNo][1][1]['/Contents'])) {
$contents = $this->_getPageContent($this->_pages[$this->pageNo][1][1]['/Contents']);
foreach ($contents AS $tmpContent) {
$buffer .= $this->_unFilterStream($tmpContent) . ' ';
}
}
return $buffer;
}
@@ -178,7 +178,7 @@ class fpdi_pdf_parser extends pdf_parser
protected function _getPageContent($contentRef)
{
$contents = array();
if ($contentRef[0] == pdf_parser::TYPE_OBJREF) {
$content = $this->resolveObject($contentRef);
if ($content[1][0] == pdf_parser::TYPE_ARRAY) {
@@ -213,12 +213,12 @@ class fpdi_pdf_parser extends pdf_parser
if (isset($page[1][1][$boxIndex])) {
$box = $page[1][1][$boxIndex];
}
if (!is_null($box) && $box[0] == pdf_parser::TYPE_OBJREF) {
$tmp_box = $this->resolveObject($box);
$box = $tmp_box[1];
}
if (!is_null($box) && $box[0] == pdf_parser::TYPE_ARRAY) {
$b = $box[1];
return array(
@@ -240,7 +240,7 @@ class fpdi_pdf_parser extends pdf_parser
/**
* Get all page boundary boxes by page number
*
*
* @param int $pageNo The page number
* @param float $k Scale factor from user space units to points
* @return array
@@ -254,7 +254,7 @@ class fpdi_pdf_parser extends pdf_parser
return $this->_getPageBoxes($this->_pages[$pageNo - 1], $k);
}
/**
* Get all boxes from /Page dictionary
*