public function convertLocalFile($inputFile = '', $outputFilename = '', $outputFormat = '')
    {
        //check whether file is set or not
        if ($inputFile == '')
            throw new Exception('No file name specified');

        if ($outputFormat == '')
            throw new Exception('output format not specified');


        $strURI = Product::$baseProductUri . '/pdf/convert?format=' . $outputFormat;

        if (!file_exists($inputFile)) {
            throw new Exception('input file doesnt exist.');
        }


        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::uploadFileBinary($signedURI, $inputFile, 'xml');

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

        if ($v_output === '') {
            if ($outputFormat == 'html') {
                $saveFormat = 'zip';
            } else {
                $saveFormat = $outputFormat;
            }

            if ($outputFilename == '') {
                $outputFilename = Utils::getFileName($inputFile) . '.' . $saveFormat;
            }
            $outputPath = AsposeApp::$outPutLocation . $outputFilename;
            Utils::saveFile($responseStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function convertLocalFile($inputFile = '', $outputFilename = '', $outputFormat = '')
    {
        //check whether file is set or not
        if ($inputFile == '')
            throw new Exception('No file name specified');

        if ($outputFormat == '')
            throw new Exception('output format not specified');


        $strURI = Product::$baseProductUri . '/pdf/convert?format=' . $outputFormat;

        if (!file_exists($inputFile)) {
            throw new Exception('input file doesnt exist.');
        }


        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::uploadFileBinary($signedURI, $inputFile, 'xml');

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

        if ($v_output === '') {
            if ($outputFormat == 'html') {
                $saveFormat = 'zip';
            } else {
                $saveFormat = $outputFormat;
            }

            if ($outputFilename == '') {
                $outputFilename = Utils::getFileName($inputFile) . '.' . $saveFormat;
            }
            $outputPath = AsposeApp::$outPutLocation . $outputFilename;
            Utils::saveFile($responseStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function convertLocalFile ( $ inputFile = '' , $ outputFilename = '' , $ outputFormat = '' ) { //check whether file is set or not if ( $ inputFile == '' ) throw new Exception ( 'No file name specified' ) ; if ( $ outputFormat == '' ) throw new Exception ( 'output format not specified' ) ; $ strURI = Product :: $ baseProductUri . '/pdf/convert?format=' . $ outputFormat ; if ( ! file_exists ( $ inputFile ) ) { throw new Exception ( 'input file doesnt exist.' ) ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: uploadFileBinary ( $ signedURI , $ inputFile , 'xml' ) ; $ v_output = Utils :: validateOutput ( $ responseStream , $ outputFormat ) ; if ( $ v_output === '' ) { if ( $ outputFormat == 'html' ) { $ saveFormat = 'zip' ; } else { $ saveFormat = $ outputFormat ; } if ( $ outputFilename == '' ) { $ outputFilename = Utils :: getFileName ( $ inputFile ) . '.' . $ saveFormat ; } $ outputPath = AsposeApp :: $ outPutLocation . $ outputFilename ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; }
Convert PDF to different file format without using Aspose cloud storage.

$param string $inputFile The path of source file.
@param string $outputFilename The output file name.
@param string $outputFormat Returns document in the specified format.

@return string Returns the file path.
@throws Exception
Convert PDF to different file format without using Aspose cloud storage .