Check if PDF is password protected - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Check if PDF is password protected

Check if PDF is password protected 3 years 5 months ago #9126

  • ashughes
  • ashughes's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Karma: 1
  • Thank you received: 0
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 3 years 5 months ago #9137

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • 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 3 years 5 months ago #9152

  • ashughes
  • ashughes's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 32
  • Karma: 1
  • Thank you received: 0
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 3 years 5 months ago #9174

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • 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