src/PDFLib.php
public function setImageFormat($imageformat,$pngScaleFactor = null){
        if($imageformat == self::$IMAGE_FORMAT_JPEG){
            $this->imageDeviceCommand = "jpeg";
            $this->imageExtention="jpg";
            $this->pngDownScaleFactor = isset($pngScaleFactor) ? "-dDownScaleFactor=".$pngScaleFactor : "";
        }else if($imageformat == self::$IMAGE_FORMAT_PNG){
            $this->imageDeviceCommand = "png16m";
            $this->imageExtention="png";
            $this->pngDownScaleFactor = "";
        }
        return $this;
    }
public function setImageFormat($imageformat,$pngScaleFactor = null){
        if($imageformat == self::$IMAGE_FORMAT_JPEG){
            $this->imageDeviceCommand = "jpeg";
            $this->imageExtention="jpg";
            $this->pngDownScaleFactor = isset($pngScaleFactor) ? "-dDownScaleFactor=".$pngScaleFactor : "";
        }else if($imageformat == self::$IMAGE_FORMAT_PNG){
            $this->imageDeviceCommand = "png16m";
            $this->imageExtention="png";
            $this->pngDownScaleFactor = "";
        }
        return $this;
    }
public function setImageFormat ( $ imageformat , $ pngScaleFactor = null ) { if ( $ imageformat == self :: $ IMAGE_FORMAT_JPEG ) { $ this -> imageDeviceCommand = "jpeg" ; $ this -> imageExtention = "jpg" ; $ this -> pngDownScaleFactor = isset ( $ pngScaleFactor ) ? "-dDownScaleFactor=" . $ pngScaleFactor : "" ; } else if ( $ imageformat == self :: $ IMAGE_FORMAT_PNG ) { $ this -> imageDeviceCommand = "png16m" ; $ this -> imageExtention = "png" ; $ this -> pngDownScaleFactor = "" ; } return $ this ; }
Change the image format to PNG or JPEG
@param string $imageformat
@param float $pngScaleFactor
@return self
Change the image format to PNG or JPEG