public class DocumentProperties extends java.lang.Object implements IDocumentProperties, IGenericCloneable<IDocumentProperties>, java.lang.Cloneable
Represents properties of a presentation.
The following example shows how to access built-in Properties of PowerPoint Presentation.// Instantiate the Presentation class that represents the presentation Presentation pres = new Presentation("AccessBuiltin Properties.pptx"); try { // Create a reference to IDocumentProperties object associated with Presentation IDocumentProperties documentProperties = pres.getDocumentProperties(); // Display the builtin properties System.out.println("Category : " + documentProperties.getCategory()); System.out.println("Current Status : " + documentProperties.getContentStatus()); System.out.println("Creation Date : " + documentProperties.getCreatedTime()); System.out.println("Author : " + documentProperties.getAuthor()); System.out.println("Description : " + documentProperties.getComments()); } finally { if (pres != null) pres.dispose(); }The following example shows how to modify built-in Properties of PowerPoint Presentation.// Instantiate the Presentation class that represents the Presentation Presentation pres = new Presentation("ModifyBuiltinProperties.pptx"); try { // Create a reference to IDocumentProperties object associated with Presentation IDocumentProperties documentProperties = pres.getDocumentProperties(); // Set the builtin properties documentProperties.setAuthor("Aspose.Slides for Java"); documentProperties.setTitle("Modifying Presentation Properties"); documentProperties.setSubject("Aspose Subject"); // Save your presentation to a file pres.save("DocumentProperties_out.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
| Constructor and Description |
|---|
DocumentProperties()
Initializes new instance of class
DocumentProperties. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBuiltInProperties()
Clears and sets default values for all builtIn properties.
|
void |
clearCustomProperties()
Removes all custom properties.
|
IDocumentProperties |
cloneT()
Clones current object
|
boolean |
containsCustomProperty(java.lang.String name)
Check presents of a custom property with a specified name.
|
java.lang.Object |
deepClone()
Clones current object
|
java.lang.Object |
get_Item(java.lang.String name)
Returns or sets the custom property associated with a specified name.
|
java.lang.String |
getApplicationTemplate()
Returns or sets the template of a application.
|
java.lang.String |
getAppVersion()
Returns the app version.
|
java.lang.String |
getAuthor()
Returns or sets the author of a presentation.
|
java.lang.String |
getCategory()
Returns or sets the category of a presentation.
|
java.lang.String |
getComments()
Returns or sets the comments of a presentation.
|
java.lang.String |
getCompany()
Returns or sets the company property.
|
java.lang.String |
getContentStatus()
Returns or sets the content status of a presentation.
|
java.lang.String |
getContentType()
Returns or sets the content type of a presentation.
|
int |
getCountOfCustomProperties()
Returns the number of custom properties actually contained in a collection.
|
java.util.Date |
getCreatedTime()
Returns the date a presentation was created.
|
java.lang.String |
getCustomPropertyName(int index)
Return a custom property name at the specified index.
|
void |
getCustomPropertyValue(java.lang.String name,
boolean[] value)
Gets a named boolean value from the custom properties.
|
void |
getCustomPropertyValue(java.lang.String name,
java.util.Date[] value)
Gets a named DateTime value from the custom properties.
|
void |
getCustomPropertyValue(java.lang.String name,
double[] value)
Gets a named double value from the custom properties.
|
void |
getCustomPropertyValue(java.lang.String name,
float[] value)
Gets a named float value from the custom properties.
|
void |
getCustomPropertyValue(java.lang.String name,
int[] value)
Gets a named integer value from the custom properties.
|
void |
getCustomPropertyValue(java.lang.String name,
java.lang.String[] value)
Gets a named string value from the custom properties.
|
IHeadingPair[] |
getHeadingPairs()
Indicates the grouping of document parts and the number of parts in each group.
|
int |
getHiddenSlides()
Returns the number of hidden slides in a presentation document.
|
java.lang.String |
getHyperlinkBase()
Returns or sets the HyperlinkBase document property.
|
boolean |
getHyperlinksChanged()
Specifies that one or more hyperlinks in this part were updated exclusively in this part by a producer.
|
java.lang.String |
getKeywords()
Returns or sets the keywords of a presentation.
|
java.util.Date |
getLastPrinted()
Returns the date when a presentation was printed last time.
|
java.lang.String |
getLastSavedBy()
Returns or sets the name of a last person who modified a presentation.
|
java.util.Date |
getLastSavedTime()
Returns the date a presentation was last modified.
|
boolean |
getLinksUpToDate()
Indicates whether hyperlinks in a document are up-to-date.
|
java.lang.String |
getManager()
Returns or sets the manager property.
|
int |
getMultimediaClips()
Returns the total number of sound or video clips that are present in the document.
|
java.lang.String |
getNameOfApplication()
Returns or sets the name of the application.
|
int |
getNotes()
Returns the number of slides in a presentation containing notes.
|
int |
getParagraphs()
Returns the total number of paragraphs found in a document if applicable.
|
java.lang.String |
getPresentationFormat()
Returns or sets the intended format of a presentation.
|
int |
getRevisionNumber()
Returns or sets the presentation revision number.
|
boolean |
getScaleCrop()
Indicates the display mode of the document thumbnail.
|
boolean |
getSharedDoc()
Determines whether the presentation is shared between multiple people.
|
int |
getSlides()
Returns the total number of slides in a presentation document.
|
java.lang.String |
getSubject()
Returns or sets the subject of a presentation.
|
java.lang.String |
getTitle()
Returns or sets the title of a presentation.
|
java.lang.String[] |
getTitlesOfParts()
Specifies the title of each document part.
|
double |
getTotalEditingTime()
Total editing time of a presentation.
|
int |
getWords()
Returns the total number of words contained in a document.
|
boolean |
removeCustomProperty(java.lang.String name)
Remove a custom property associated with a specified name.
|
void |
set_Item(java.lang.String name,
java.lang.Object value)
Returns or sets the custom property associated with a specified name.
|
void |
setApplicationTemplate(java.lang.String value)
Returns or sets the template of a application.
|
void |
setAuthor(java.lang.String value)
Returns or sets the author of a presentation.
|
void |
setCategory(java.lang.String value)
Returns or sets the category of a presentation.
|
void |
setComments(java.lang.String value)
Returns or sets the comments of a presentation.
|
void |
setCompany(java.lang.String value)
Returns or sets the company property.
|
void |
setContentStatus(java.lang.String value)
Returns or sets the content status of a presentation.
|
void |
setContentType(java.lang.String value)
Returns or sets the content type of a presentation.
|
void |
setCreatedTime(java.util.Date value)
Returns the date a presentation was created.
|
void |
setCustomPropertyValue(java.lang.String name,
boolean value)
Sets a named boolean custom property.
|
void |
setCustomPropertyValue(java.lang.String name,
java.util.Date value)
Sets a named DateTime custom property.
|
void |
setCustomPropertyValue(java.lang.String name,
double value)
Sets a named double custom property.
|
void |
setCustomPropertyValue(java.lang.String name,
float value)
Sets a named float custom property.
|
void |
setCustomPropertyValue(java.lang.String name,
int value)
Sets a named integer custom property.
|
void |
setCustomPropertyValue(java.lang.String name,
java.lang.String value)
Sets a named string custom property.
|
void |
setHyperlinkBase(java.lang.String value)
Returns or sets the HyperlinkBase document property.
|
void |
setHyperlinksChanged(boolean value)
Specifies that one or more hyperlinks in this part were updated exclusively in this part by a producer.
|
void |
setKeywords(java.lang.String value)
Returns or sets the keywords of a presentation.
|
void |
setLastPrinted(java.util.Date value)
Returns the date when a presentation was printed last time.
|
void |
setLastSavedBy(java.lang.String value)
Returns or sets the name of a last person who modified a presentation.
|
void |
setLastSavedTime(java.util.Date value)
Returns the date a presentation was last modified.
|
void |
setLinksUpToDate(boolean value)
Indicates whether hyperlinks in a document are up-to-date.
|
void |
setManager(java.lang.String value)
Returns or sets the manager property.
|
void |
setNameOfApplication(java.lang.String value)
Returns or sets the name of the application.
|
void |
setPresentationFormat(java.lang.String value)
Returns or sets the intended format of a presentation.
|
void |
setRevisionNumber(int value)
Returns or sets the presentation revision number.
|
void |
setScaleCrop(boolean value)
Indicates the display mode of the document thumbnail.
|
void |
setSharedDoc(boolean value)
Determines whether the presentation is shared between multiple people.
|
void |
setSubject(java.lang.String value)
Returns or sets the subject of a presentation.
|
void |
setTitle(java.lang.String value)
Returns or sets the title of a presentation.
|
void |
setTotalEditingTime(double value)
Total editing time of a presentation.
|
public DocumentProperties()
Initializes new instance of class DocumentProperties.
public final java.lang.String getAppVersion()
Returns the app version.
Read-only String.
getAppVersion in interface IDocumentPropertiespublic final java.lang.String getNameOfApplication()
Returns or sets the name of the application.
Read/write String.
getNameOfApplication in interface IDocumentPropertiespublic final void setNameOfApplication(java.lang.String value)
Returns or sets the name of the application.
Read/write String.
setNameOfApplication in interface IDocumentPropertiespublic final java.lang.String getCompany()
Returns or sets the company property.
Read/write String.
getCompany in interface IDocumentPropertiespublic final void setCompany(java.lang.String value)
Returns or sets the company property.
Read/write String.
setCompany in interface IDocumentPropertiespublic final java.lang.String getManager()
Returns or sets the manager property.
Read/write String.
getManager in interface IDocumentPropertiespublic final void setManager(java.lang.String value)
Returns or sets the manager property.
Read/write String.
setManager in interface IDocumentPropertiespublic final java.lang.String getPresentationFormat()
Returns or sets the intended format of a presentation.
Read/write String.
getPresentationFormat in interface IDocumentPropertiespublic final void setPresentationFormat(java.lang.String value)
Returns or sets the intended format of a presentation.
Read/write String.
setPresentationFormat in interface IDocumentPropertiespublic final boolean getSharedDoc()
Determines whether the presentation is shared between multiple people. Read/write boolean.
getSharedDoc in interface IDocumentPropertiespublic final void setSharedDoc(boolean value)
Determines whether the presentation is shared between multiple people. Read/write boolean.
setSharedDoc in interface IDocumentPropertiespublic final java.lang.String getApplicationTemplate()
Returns or sets the template of a application.
Read/write String.
getApplicationTemplate in interface IDocumentPropertiespublic final void setApplicationTemplate(java.lang.String value)
Returns or sets the template of a application.
Read/write String.
setApplicationTemplate in interface IDocumentPropertiespublic final double getTotalEditingTime()
Total editing time of a presentation.
Read/write double.
getTotalEditingTime in interface IDocumentPropertiespublic final void setTotalEditingTime(double value)
Total editing time of a presentation.
Read/write double.
setTotalEditingTime in interface IDocumentPropertiespublic final java.lang.String getTitle()
Returns or sets the title of a presentation.
Read/write String.
getTitle in interface IDocumentPropertiespublic final void setTitle(java.lang.String value)
Returns or sets the title of a presentation.
Read/write String.
setTitle in interface IDocumentPropertiespublic final java.lang.String getSubject()
Returns or sets the subject of a presentation.
Read/write String.
getSubject in interface IDocumentPropertiespublic final void setSubject(java.lang.String value)
Returns or sets the subject of a presentation.
Read/write String.
setSubject in interface IDocumentPropertiespublic final java.lang.String getAuthor()
Returns or sets the author of a presentation.
Read/write String.
getAuthor in interface IDocumentPropertiespublic final void setAuthor(java.lang.String value)
Returns or sets the author of a presentation.
Read/write String.
setAuthor in interface IDocumentPropertiespublic final java.lang.String getKeywords()
Returns or sets the keywords of a presentation.
Read/write String.
getKeywords in interface IDocumentPropertiespublic final void setKeywords(java.lang.String value)
Returns or sets the keywords of a presentation.
Read/write String.
setKeywords in interface IDocumentPropertiespublic final java.lang.String getComments()
Returns or sets the comments of a presentation.
Read/write String.
getComments in interface IDocumentPropertiespublic final void setComments(java.lang.String value)
Returns or sets the comments of a presentation.
Read/write String.
setComments in interface IDocumentPropertiespublic final java.lang.String getCategory()
Returns or sets the category of a presentation.
Read/write String.
getCategory in interface IDocumentPropertiespublic final void setCategory(java.lang.String value)
Returns or sets the category of a presentation.
Read/write String.
setCategory in interface IDocumentPropertiespublic final java.util.Date getCreatedTime()
Returns the date a presentation was created.
Values are in UTC.
Read/write Date.
getCreatedTime in interface IDocumentPropertiespublic final void setCreatedTime(java.util.Date value)
Returns the date a presentation was created.
Values are in UTC.
Read/write Date.
setCreatedTime in interface IDocumentPropertiespublic final java.util.Date getLastSavedTime()
Returns the date a presentation was last modified.
Values are in UTC.
Read-only in case of Presentation.DocumentProperties (because it will be updated internally while IPresentation object saving process).
Can be changed via DocumentProperties instance returning by method IPresentationInfo.readDocumentProperties()
Please see the example in IPresentationInfo.updateDocumentProperties(IDocumentProperties) method summary.
getLastSavedTime in interface IDocumentPropertiespublic final void setLastSavedTime(java.util.Date value)
Returns the date a presentation was last modified.
Values are in UTC.
Read-only in case of Presentation.DocumentProperties (because it will be updated internally while IPresentation object saving process).
Can be changed via DocumentProperties instance returning by method IPresentationInfo.readDocumentProperties()
Please see the example in IPresentationInfo.updateDocumentProperties(IDocumentProperties) method summary.
setLastSavedTime in interface IDocumentPropertiespublic final java.util.Date getLastPrinted()
Returns the date when a presentation was printed last time.
Read/write Date.
getLastPrinted in interface IDocumentPropertiespublic final void setLastPrinted(java.util.Date value)
Returns the date when a presentation was printed last time.
Read/write Date.
setLastPrinted in interface IDocumentPropertiespublic final java.lang.String getLastSavedBy()
Returns or sets the name of a last person who modified a presentation.
Read/write String.
getLastSavedBy in interface IDocumentPropertiespublic final void setLastSavedBy(java.lang.String value)
Returns or sets the name of a last person who modified a presentation.
Read/write String.
setLastSavedBy in interface IDocumentPropertiespublic final int getRevisionNumber()
Returns or sets the presentation revision number. Read/write int.
getRevisionNumber in interface IDocumentPropertiespublic final void setRevisionNumber(int value)
Returns or sets the presentation revision number. Read/write int.
setRevisionNumber in interface IDocumentPropertiespublic final java.lang.String getContentStatus()
Returns or sets the content status of a presentation.
Read/write String.
getContentStatus in interface IDocumentPropertiespublic final void setContentStatus(java.lang.String value)
Returns or sets the content status of a presentation.
Read/write String.
setContentStatus in interface IDocumentPropertiespublic final java.lang.String getContentType()
Returns or sets the content type of a presentation.
Read/write String.
getContentType in interface IDocumentPropertiespublic final void setContentType(java.lang.String value)
Returns or sets the content type of a presentation.
Read/write String.
setContentType in interface IDocumentPropertiespublic final java.lang.String getHyperlinkBase()
Returns or sets the HyperlinkBase document property.
Read/write String.
getHyperlinkBase in interface IDocumentPropertiespublic final void setHyperlinkBase(java.lang.String value)
Returns or sets the HyperlinkBase document property.
Read/write String.
setHyperlinkBase in interface IDocumentPropertiespublic final int getCountOfCustomProperties()
Returns the number of custom properties actually contained in a collection. Read-only int.
getCountOfCustomProperties in interface IDocumentPropertiespublic final java.lang.String getCustomPropertyName(int index)
Return a custom property name at the specified index.
getCustomPropertyName in interface IDocumentPropertiesindex - The zero-based index of a custom property to get.com.aspose.ms.System.ArgumentOutOfRangeException - Index is less than zero. Index is equal to or greater than Count.public final boolean removeCustomProperty(java.lang.String name)
Remove a custom property associated with a specified name.
removeCustomProperty in interface IDocumentPropertiesname - Name of a custom property to remove.public final boolean containsCustomProperty(java.lang.String name)
Check presents of a custom property with a specified name.
containsCustomProperty in interface IDocumentPropertiesname - Name of a custom property to check.public final java.lang.Object get_Item(java.lang.String name)
Returns or sets the custom property associated with a specified name.
Read/write Object.
get_Item in interface IDocumentPropertiespublic final void set_Item(java.lang.String name,
java.lang.Object value)
Returns or sets the custom property associated with a specified name.
Read/write Object.
set_Item in interface IDocumentPropertiespublic final void getCustomPropertyValue(java.lang.String name,
boolean[] value)
Gets a named boolean value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to getvalue - Custom property valuepublic final void getCustomPropertyValue(java.lang.String name,
int[] value)
Gets a named integer value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to getvalue - Custom property valuepublic final void getCustomPropertyValue(java.lang.String name,
java.util.Date[] value)
Gets a named DateTime value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to getvalue - Custom property valuepublic final void getCustomPropertyValue(java.lang.String name,
java.lang.String[] value)
Gets a named string value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to getvalue - Custom property valuepublic final void getCustomPropertyValue(java.lang.String name,
float[] value)
Gets a named float value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to getvalue - Custom property valuepublic final void getCustomPropertyValue(java.lang.String name,
double[] value)
Gets a named double value from the custom properties.
getCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to get.value - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
boolean value)
Sets a named boolean custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
int value)
Sets a named integer custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
java.util.Date value)
Sets a named DateTime custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
java.lang.String value)
Sets a named string custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
float value)
Sets a named float custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void setCustomPropertyValue(java.lang.String name,
double value)
Sets a named double custom property.
setCustomPropertyValue in interface IDocumentPropertiesname - Name of the custom property to setvalue - Custom property valuepublic final void clearCustomProperties()
Removes all custom properties.
clearCustomProperties in interface IDocumentPropertiespublic final void clearBuiltInProperties()
Clears and sets default values for all builtIn properties.
clearBuiltInProperties in interface IDocumentPropertiespublic final boolean getScaleCrop()
Indicates the display mode of the document thumbnail. Set this element to true to enable scaling of the document thumbnail to the display. Set this element to false to enable cropping of the document thumbnail to show only sections that fits the display. Read/write boolean.
getScaleCrop in interface IDocumentPropertiespublic final void setScaleCrop(boolean value)
Indicates the display mode of the document thumbnail. Set this element to true to enable scaling of the document thumbnail to the display. Set this element to false to enable cropping of the document thumbnail to show only sections that fits the display. Read/write boolean.
setScaleCrop in interface IDocumentPropertiespublic final boolean getLinksUpToDate()
Indicates whether hyperlinks in a document are up-to-date. Set this element to true to indicate that hyperlinks are updated. Set this element to false to indicate that hyperlinks are outdated. Read/write boolean.
getLinksUpToDate in interface IDocumentPropertiespublic final void setLinksUpToDate(boolean value)
Indicates whether hyperlinks in a document are up-to-date. Set this element to true to indicate that hyperlinks are updated. Set this element to false to indicate that hyperlinks are outdated. Read/write boolean.
setLinksUpToDate in interface IDocumentPropertiespublic final boolean getHyperlinksChanged()
Specifies that one or more hyperlinks in this part were updated exclusively in this part by a producer. The next producer to open this document shall update the hyperlink relationships with the new hyperlinks specified in this part. Read/write boolean.
getHyperlinksChanged in interface IDocumentPropertiespublic final void setHyperlinksChanged(boolean value)
Specifies that one or more hyperlinks in this part were updated exclusively in this part by a producer. The next producer to open this document shall update the hyperlink relationships with the new hyperlinks specified in this part. Read/write boolean.
setHyperlinksChanged in interface IDocumentPropertiespublic final int getSlides()
Returns the total number of slides in a presentation document. Read-only int.
getSlides in interface IDocumentPropertiespublic final int getHiddenSlides()
Returns the number of hidden slides in a presentation document. Read-only int.
getHiddenSlides in interface IDocumentPropertiespublic final int getNotes()
Returns the number of slides in a presentation containing notes. Read-only int.
getNotes in interface IDocumentPropertiespublic final int getParagraphs()
Returns the total number of paragraphs found in a document if applicable. Read-only int.
getParagraphs in interface IDocumentPropertiespublic final int getWords()
Returns the total number of words contained in a document. Read-only int.
getWords in interface IDocumentPropertiespublic final int getMultimediaClips()
Returns the total number of sound or video clips that are present in the document. Read-only int.
getMultimediaClips in interface IDocumentPropertiespublic final java.lang.String[] getTitlesOfParts()
Specifies the title of each document part.
These parts are not document parts but conceptual representations of document sections.
Read-only String[].
getTitlesOfParts in interface IDocumentPropertiespublic final IHeadingPair[] getHeadingPairs()
Indicates the grouping of document parts and the number of parts in each group.
Read-only IHeadingPair[].
getHeadingPairs in interface IDocumentPropertiespublic final java.lang.Object deepClone()
Clones current object
public final IDocumentProperties cloneT()
Clones current object
cloneT in interface IGenericCloneable<IDocumentProperties>Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.