Get info about pages of a password-protected PDF

This example shows how to load a password protected PDF and get its page count and page sizes. For reference, the loaded PDF is protected with the owner password 'owner' and user password 'user'.