ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > PDF Component API Reference > PDF Component Callback Functions Reference > LPFNIG_PDF_AUTHPROC

This callback is used by document open routine; it is called when an encrypted document is being opened to determine whether or not the user is authorized to open the file.


Copy Code
        HIG_PDF_DOC hDoc,
        LPVOID clientData


Name Type Description
hDoc HIG_PDF_DOC The PDF document to open.
clientData LPVOID User-supplied data that was passed in the call to IG_PDF_register_authproc.

Return Value:

TRUE if the user is authorized to open the document; FALSE otherwise.

Supported Raster Image Formats:

This function does not process image pixels.


This callback implements whatever authorization strategy you choose and calls the callbacks of the appropriate security handler (the one that was used to secure the document) to obtain and check authorization data.

The LPFNIG_PDF_AUTHPROC should obtain the authorization data (a password) and call IG_PDF_doc_perm_request(). IG_PDF_doc_perm_request in turn calls the document encryption handler's Authorize function, which returns the permissions that the authorization data enables. IG_PDF_doc_perm_request adds these permissions to those currently allowed, and returns the new set of allowed permissions.

Is this page helpful?
Yes No
Thanks for your feedback.