Skip to end of metadata
Go to start of metadata
Contents Summary
 

The code sample in below examples uses some methods defined in Working with Common Utilities.

This feature is supported by version 18.12 or greater.

Working with Password-Protected Documents

Using GroupDocs.Metadata for Java API you can also work with password-protected documents of following file formats:

  • Word Processing Documents 
  • Presentation Documents 
  • Excel Documents 
  • PDF Documents 

Working with Password-Protected Word Document 

To work with the password-protected Word document, the following steps are needed to be followed:

  • Initialize LoadOptions and pass the password for the protected file as a parameter
  • Initialize DocFormat and pass LoadOptions as a parameter
  • Work with password protected document 

Following code snippet works with password protected Word document:

Working with Password-Protected Presentation Document 

To work with the password-protected Presentation document, the following steps are needed to be followed:

  • Initialize LoadOptions and pass the password for the protected file as a parameter
  • Initialize PptFormat and pass LoadOptions as a parameter
  • Work with password protected document 

Following code snippet works with password protected Presentation document:

Working with Password-Protected Excel Document 

To work with the password-protected Excel document, the following steps are needed to be followed:

  • Initialize LoadOptions and pass the password for the protected file as a parameter
  • Initialize XlsFormat and pass LoadOptions as a parameter
  • Work with password protected document 

Following code snippet works with password protected Excel document:

Working with Password-Protected PDF Document 

To work with the password-protected PDF document, the following steps are needed to be followed:

  • Initialize LoadOptions and pass the password for the protected file as a parameter
  • Initialize PdfFormat and pass LoadOptions as a parameter
  • Work with password protected document 

Following code snippet works with password protected PDF document:

Labels
  • No labels