PHP Code to Unprotect Word Document Using Aspose for Cloud API


/ Published in: PHP

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


Copy this code and paste it in your HTML
  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 ****/

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.