public interface IPresentationInfo
Information about presentation file
Modifier and Type | Method and Description |
---|---|
boolean |
checkWriteProtection(java.lang.String password)
Checks whether a password to modify is correct for a write protected presentation.
|
int |
getLoadFormat()
Gets format of the binded presentation.
|
boolean |
isEncrypted()
Gets True if binded presentation is encrypted, otherwise False.
|
boolean |
isPasswordProtected()
Gets a value that indicates whether a binded presentation is protected by a password to open.
|
byte |
isWriteProtected()
Gets a value that indicates whether a binded presentation is write protected.
|
IDocumentProperties |
readDocumentProperties()
Gets document properties of binded presentation.
|
void |
updateDocumentProperties(IDocumentProperties documentProperties)
Updates properties of binded presentation.
|
void |
writeBindedPresentation(java.io.OutputStream stream)
Writes binded presentation to stream.
|
void |
writeBindedPresentation(java.lang.String file)
Writes binded presentation to file.
|
boolean isEncrypted()
Gets True if binded presentation is encrypted, otherwise False.
Read-only boolean
.
boolean isPasswordProtected()
Gets a value that indicates whether a binded presentation is protected by a password to open.
IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo(presentationFilePath); if (info.isPasswordProtected()) { System.out.println("The presentation '" + presentationFilePath + "' is protected by a password to open."); }
byte isWriteProtected()
Gets a value that indicates whether a binded presentation is write protected.
IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo(presentationFilePath); if (info.isWriteProtected() == NullableBool.True) { System.out.println("The presentation '" + presentationFilePath + "' is write protected by a password."); }
NullableBool
enumeration.
int getLoadFormat()
Gets format of the binded presentation.
Read-only LoadFormat
.
boolean checkWriteProtection(java.lang.String password)
Checks whether a password to modify is correct for a write protected presentation.
IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo(presentationFilePath); if (info.isWriteProtected() == NullableBool.True) { boolean isWriteProtectedByPassword = info.checkWriteProtection("my_password"); }
password
- The password to check.
IsWriteProtected
(isWriteProtected()
) property before calling this method.
2. When password is null or empty, this method returns false.
com.aspose.ms.System.InvalidOperationException
- If a presentation is protected by a password to open or format does not support write protectionIDocumentProperties readDocumentProperties()
Gets document properties of binded presentation.
void updateDocumentProperties(IDocumentProperties documentProperties)
Updates properties of binded presentation.
This sample shows how to call theupdateDocumentProperties(IDocumentProperties)
method to update the document properties returned by call of thereadDocumentProperties()
method.IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo("pres.pptx"); IDocumentProperties props = info.readDocumentProperties(); props.setSubject("New subject"); props.setLastSavedTime(Calendar.getInstance().getTime()); info.updateDocumentProperties(props); info.writeBindedPresentation("new_pres.pptx");
void writeBindedPresentation(java.io.OutputStream stream)
Writes binded presentation to stream.
stream
- The stream must be seekable and writable.void writeBindedPresentation(java.lang.String file)
Writes binded presentation to file.
file
- Presentation file.Copyright © 2004-2020 Aspose Pty Ltd. All Rights Reserved.