Implementing a custom PDF security handler in PHP

Q: In your PHP encryption sample i have found:

if($doc->InitStdSecurityHandler($password,

strlen($password)))

{

$success = true;

echo “The password is correct.\n”;

}

this works fine :slight_smile:

but how can i implement a CUSTOM security handler in php?

In PDFNetPHP.php file i didn’t found a "RegisterSecurityHandler’

function :frowning:

A:

You can implement a custom PDF security handler in PHP but you would need to use the approach described in:

https://groups.google.com/d/topic/pdfnet-sdk/NgqlnQn3eig/discussion

The article refers to JAVA, but the same technique would work in PHP and other bindings.