Skip to content

Commit

Permalink
fpdf-1.8.4 の _out() メソッドを移植
Browse files Browse the repository at this point in the history
fpdf-1.8.5 は fpdi-2.x を使用する必要があるが、システム要件が PHP5.6+
となってしまう。
fpdf-1.8.4 の _out() メソッドを SC_Helper_FPDI クラスに移植することで、
fpdi-1.6.2 でも動作する
  • Loading branch information
nanasess committed Dec 6, 2022
1 parent 86fc2e8 commit dc13f70
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions data/class/helper/SC_Helper_FPDI.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,17 @@ public function lfConvSjis($conv_str)

return $conv_str;
}

public function _out($s)
{
// Add a line to the document
if($this->state==2)
$this->pages[$this->page] .= $s."\n";
elseif($this->state==1)
$this->_put($s);
elseif($this->state==0)
$this->Error('No page has been added yet');
elseif($this->state==3)
$this->Error('The document is closed');
}
}

0 comments on commit dc13f70

Please sign in to comment.