getPermissions

Get the permission word from an input PDF file.
getPermissions([in] LONG inputHandle, [out, retval] int *permissions)
This function returns the permission word from an input PDF file.

The return value from this function is only valid if isEncrypted returned non-zero.

The perm* properties can be used to test various permission bits:

For more information, see Table 3.20 in the PDF 1.7 spec.

Note that all of the permission bit constants are read-only properties on the COM component, so you'll need to use pdf.permPrint, etc.

VB6:
Dim in as Long in = pdf.openInput("c:/test/file.pdf") If pdf.isEncrypted(in) Then permissions = pdf.getPermissions(in) If (permissions And pdf.permPrint) = 0 Then ' not allowed to print End If }
VB.net:
Dim in as Long in = pdf.openInput("c:/test/file.pdf") If pdf.isEncrypted(in) Then permissions = pdf.getPermissions(in) If (permissions And pdf.permPrint) = 0 Then ' not allowed to print End If }
isEncrypted