public function unprotectDocument(array $options)
    {
        $resolver = new OptionsResolver();
        $resolver->setRequired('Password')
            ->setDefaults(array(
                'ProtectionType' => 'AllowOnlyComments'
            ))
            ->setAllowedValues('ProtectionType', array(
                'AllowOnlyComments',
                'AllowOnlyFormFields',
                'AllowOnlyRevisions',
                'ReadOnly',
                'NoProtection',
            ));
        $options = $resolver->resolve($options);

        $json = json_encode($options);
        $strURI = Product::$baseProductUri . '/words/' . $this->getFileName() . '/protection';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'DELETE', 'json', $json);
        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $strURI = Product::$baseProductUri . '/storage/file/' . $this->getFileName();
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
            $outputFile = AsposeApp::$outPutLocation . $this->getFileName();
            Utils::saveFile($responseStream, $outputFile);

            return $outputFile;
        } else {
            return $v_output;
        }
    }
public function unprotectDocument(array $options)
    {
        $resolver = new OptionsResolver();
        $resolver->setRequired('Password')
            ->setDefaults(array(
                'ProtectionType' => 'AllowOnlyComments'
            ))
            ->setAllowedValues('ProtectionType', array(
                'AllowOnlyComments',
                'AllowOnlyFormFields',
                'AllowOnlyRevisions',
                'ReadOnly',
                'NoProtection',
            ));
        $options = $resolver->resolve($options);

        $json = json_encode($options);
        $strURI = Product::$baseProductUri . '/words/' . $this->getFileName() . '/protection';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'DELETE', 'json', $json);
        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $strURI = Product::$baseProductUri . '/storage/file/' . $this->getFileName();
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
            $outputFile = AsposeApp::$outPutLocation . $this->getFileName();
            Utils::saveFile($responseStream, $outputFile);

            return $outputFile;
        } else {
            return $v_output;
        }
    }
public function unprotectDocument ( array $ options ) { $ resolver = new OptionsResolver ( ) ; $ resolver -> setRequired ( 'Password' ) -> setDefaults ( array ( 'ProtectionType' => 'AllowOnlyComments' ) ) -> setAllowedValues ( 'ProtectionType' , array ( 'AllowOnlyComments' , 'AllowOnlyFormFields' , 'AllowOnlyRevisions' , 'ReadOnly' , 'NoProtection' , ) ) ; $ options = $ resolver -> resolve ( $ options ) ; $ json = json_encode ( $ options ) ; $ strURI = Product :: $ baseProductUri . '/words/' . $ this -> getFileName ( ) . '/protection' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'DELETE' , 'json' , $ json ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ this -> getFileName ( ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ outputFile = AsposeApp :: $ outPutLocation . $ this -> getFileName ( ) ; Utils :: saveFile ( $ responseStream , $ outputFile ) ; return $ outputFile ; } else { return $ v_output ; } }
Unprotect a document on the Aspose cloud storage.

@param array $options that will get processed using a OptionsResolver
<ul>
<li>'ProtectionType' => (string) Document protection password</li>
<li>'ProtectionType' => (string) Document protection type, one from: AllowOnlyComments, AllowOnlyFormFields, AllowOnlyRevisions, ReadOnly, NoProtection</li>
</ul>

@return string $filePath.
@throws Exception|InvalidOptionsException
Unprotect a document on the Aspose cloud storage .