» PHP Sample Code: Encrypt PDF with PHP
SetLicenseKey("License Code"); //Set your license key if ( 1 == $obj->LoadFromFile("../PDFEncryptX.pdf", "") ) //Load PDF file { //Create Permissions: Can not to print, copy and edit. iPermissions = $obj->CreatePermission(0, 0, 0, 1, 1, 1, 1, 1) //Call encrypt() method if ( 1 == $obj->Encrypt("../PDFEncryptX_CanNot_Print_Copy_Edit.pdf", 2, iPermissions, "", "") ) { echo "Encrypt successful." ; } } $obj = null; ?>