Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Check if PDF is password protected 9 years 10 months ago #9126

  • ashughes
  • ashughes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 1
Hello,

Is there a way to check if a PDF is password protected, other than calling Document.Open() and checking the return value? I would like to be able to check if the PDF is password protected without actually opening it if it's not.

Thanks,
Andrew

Please Log in or Create an account to join the conversation.

Check if PDF is password protected 9 years 10 months ago #9137

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
sorry fo the delay.

Yes try to use :
Document.IsEncrypted()
For more info check this .

Please Log in or Create an account to join the conversation.

Check if PDF is password protected 9 years 10 months ago #9152

  • ashughes
  • ashughes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 1
Document.IsEncrypted() can only be called after a Document has been opened. I would like a way to check if a PDF is password protected without actually opening it. Such as a static method:
Document.IsEncrypted( String path )

Also, just for clarification, is "encryption" the same thing as password protection?

Please Log in or Create an account to join the conversation.

Check if PDF is password protected 9 years 10 months ago #9174

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
yes they are the same thing.

About the static method, we are evaluating to make a method that returns if the pdf isEncypted or not, but even in this method we have to open the pdf, check if is encrypted and return (same operation you do now).

Please Log in or Create an account to join the conversation.

Last edit: by Davide.
  • Page:
  • 1
Powered by Kunena Forum