Skip to content

A trimmed version of Java's PdfRenderer library that only validates a Pdf's password

Notifications You must be signed in to change notification settings

saket/pdf-password-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A trimmed down version of PDFRenderer, which only validates a PDF's password.

Usage

File pdf = ...
String password = ...

PdfValidationResult validationResult = PdfValidator.validate(pdf, password);
switch(validationResult) {
  case VALID:
  case INVALID_PDF:
  case INCORRECT_PASSWORD:
  case UNKNOWN:
  case FILE_NOT_FOUND:	
}

If you only want to check if a PDF is password protected, then PdfValidator.isPasswordProtected() can also be used. Don't use them together though.

About

A trimmed version of Java's PdfRenderer library that only validates a Pdf's password

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages