PhpOffice\PhpPresentation\PhpPresentation::setZoom PHP 메소드

setZoom() 공개 메소드

Set the zoom of the document (in percentage)
사용 중단: for getPresentationProperties()->setZoom()
public setZoom ( float $zoom = 1 ) : PhpPresentation
$zoom float
리턴 PhpPresentation
    public function setZoom($zoom = 1)
    {
        return $this->getPresentationProperties()->setZoom($zoom);
    }

Usage Example

예제 #1
0
 /**
  * Read View Properties
  * @param string $sPart
  */
 protected function loadViewProperties($sPart)
 {
     $xmlReader = new XMLReader();
     if ($xmlReader->getDomFromString($sPart)) {
         $pathZoom = '/p:viewPr/p:slideViewPr/p:cSldViewPr/p:cViewPr/p:scale/a:sx';
         if (is_object($oElement = $xmlReader->getElement($pathZoom))) {
             if ($oElement->hasAttribute('d') && $oElement->hasAttribute('n')) {
                 $this->oPhpPresentation->setZoom($oElement->getAttribute('n') / $oElement->getAttribute('d'));
             }
         }
     }
 }
All Usage Examples Of PhpOffice\PhpPresentation\PhpPresentation::setZoom