Posted By

johansonkatherine on 06/19/14


Tagged

a document word Unprotect


Versions (?)

PHP Code to Unprotect Word Document Using Aspose for Cloud API


 / Published in: PHP
 

URL: http://www.aspose.com/blogs/aspose-products/aspose-for-cloud-apis/archive/2014/06/11/apply-or-amend-protection-and-unprotection-on-word-processing-documents-using-aspose-cloud-sdk-for-php.html

The following technical tip shows how php developers can unprotect their word documents in cloud using Aspose for Cloud SDK in php.

  1. use Aspose\Cloud\Common\AsposeApp;
  2. use Aspose\Cloud\Common\Product;
  3. use Aspose\Cloud\Common\Utils;
  4. use Aspose\Cloud\Words\Document;
  5.  
  6. /**** Section 1 ****/
  7. Product::$baseProductUri = 'http://api.aspose.com/v1.1';
  8. AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx";
  9. AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx";
  10. AsposeApp::$outPutLocation = getcwd() . "/output/";
  11. /**** End Section 1 ****/
  12.  
  13. /**** Section 2 ****/
  14. $fileName = "Test.docx";
  15. $password = "123456";
  16. $protectionType = "NoProtection";
  17.  
  18. $doc = new Document($fileName);
  19. $result = $doc->unprotectDocument($password, $protectionType);
  20. /**** End Section 2 ****/

Report this snippet  

You need to login to post a comment.