by
426 17
1
6
2,791
3
Top 1% !
Popular
Famous
Easy-to-find
Specified
OpenSource
Popularity: 4519th place
Created
Modified Jun 19, 2014

Published on:

Languagephp
LicenseMIT_X11

PHP Code to Protect a Word Document Using Aspose for Cloud API

The following technical tip shows how php developers can protect their word documents in cloud using Aspose for Cloud SDK in php.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/67659/PHP-Code-to-Protect-a-Word-Document-Usin?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
use Aspose\Cloud\Common\AsposeApp; use Aspose\Cloud\Common\Product; use Aspose\Cloud\Common\Utils; use Aspose\Cloud\Words\Document; /**** Section 1 ****/ Product::$baseProductUri = 'http://api.aspose.com/v1.1'; AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx"; AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx"; AsposeApp::$outPutLocation = getcwd() . "/output/"; /**** End Section 1 ****/ /**** Section 2 ****/ $fileName = "Test.docx"; $password = "123456"; $protectionType = "AllowOnlyComments"; $doc = new Document($fileName); $result = $doc->protectDocument($password, $protectionType); /**** End Section 2 ****/
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus