public function saveAs($outputPath, $saveFormat, $jpegQuality = '', $storageName = '', $folder = '')
    {


        if ($outputPath == '')
            throw new Exception('Output path not specified');

        if ($saveFormat == '')
            throw new Exception('Save format not specified');


        $strURI = Product::$baseProductUri . '/slides/' . $this->getFileName() . '?format=' . $saveFormat;
        if ($folder != '') {
            $strURI .= '&folder=' . $folder;
        }
        if ($storageName != '') {
            $strURI .= '&storage=' . $storageName;
        }
        if ($jpegQuality != '') {
            $strURI .= '&jpegQuality=' . $jpegQuality;
        }
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $output = $outputPath . Utils::getFileName($this->getFileName()) . '.' . $saveFormat;
            Utils::saveFile($responseStream, $output);
            return $output;
        } else
            return $v_output;
    }
public function saveAs($outputPath, $saveFormat, $jpegQuality = '', $storageName = '', $folder = '')
    {


        if ($outputPath == '')
            throw new Exception('Output path not specified');

        if ($saveFormat == '')
            throw new Exception('Save format not specified');


        $strURI = Product::$baseProductUri . '/slides/' . $this->getFileName() . '?format=' . $saveFormat;
        if ($folder != '') {
            $strURI .= '&folder=' . $folder;
        }
        if ($storageName != '') {
            $strURI .= '&storage=' . $storageName;
        }
        if ($jpegQuality != '') {
            $strURI .= '&jpegQuality=' . $jpegQuality;
        }
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $output = $outputPath . Utils::getFileName($this->getFileName()) . '.' . $saveFormat;
            Utils::saveFile($responseStream, $output);
            return $output;
        } else
            return $v_output;
    }
public function saveAs ( $ outputPath , $ saveFormat , $ jpegQuality = '' , $ storageName = '' , $ folder = '' ) { if ( $ outputPath == '' ) throw new Exception ( 'Output path not specified' ) ; if ( $ saveFormat == '' ) throw new Exception ( 'Save format not specified' ) ; $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '?format=' . $ saveFormat ; if ( $ folder != '' ) { $ strURI .= '&folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } if ( $ jpegQuality != '' ) { $ strURI .= '&jpegQuality=' . $ jpegQuality ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { $ output = $ outputPath . Utils :: getFileName ( $ this -> getFileName ( ) ) . '.' . $ saveFormat ; Utils :: saveFile ( $ responseStream , $ output ) ; return $ output ; } else return $ v_output ; }
saves the document into various formats.

@param string $outputPath The output directory path.
@param string $saveFormat Return the presentation in the specified format.

@return string Returns the file path.
@throws Exception
saves the document into various formats .