예제 #1
0
 public function __construct(TCPDF $pdf, array $cellsToAdd = array())
 {
     parent::__construct($pdf);
     if (sizeof($cellsToAdd)) {
         foreach ($cellsToAdd as $cellToAdd) {
             $this->addCell($cellToAdd);
         }
     } else {
         $cells = array();
     }
 }
예제 #2
0
 public function __construct(TCPDF $pdf, array $rowsToAdd = array())
 {
     parent::__construct($pdf);
     if (sizeof($rowsToAdd)) {
         foreach ($rowsToAdd as $rowToAdd) {
             if ($rowToAdd instanceof OOPHPDF_Row) {
                 $this->addRow($rowToAdd);
             }
         }
     } else {
         $this->rows = array();
     }
 }
예제 #3
0
 public function __construct($pdf, $filePath, $x = null, $y = null, $width = null, $height = null)
 {
     parent::__construct($pdf);
     // Set file path and file type
     $this->setImage($filePath);
     // Set image position
     if (!is_null($x)) {
         $this->setX($x);
     } else {
         $this->setX($this->pdf->getX());
     }
     if (!is_null($y)) {
         $this->setY($y);
     } else {
         $this->setY($this->pdf->getY());
     }
     // Set width and height, basing off of file size if not given
     if (!is_null($width)) {
         $this->setWidth($width);
     }
     if (!is_null($height)) {
         $this->setHeight($height);
     }
 }
예제 #4
0
 public function __construct(TCPDF $pdf)
 {
     parent::__construct($pdf);
     // set a default value for the border of the svg image
     $this->setInitialBorderValues();
 }