Skip to main content

DocumentProperties Class

Contains presentation document properties.

Declaration

public class DocumentProperties extends PresentationObject

Remarks

DocumentProperties contains all document properties. You can choose between built-in and custom document properties.

Built-In Document Properties

The following code snippet specifies built-in document properties:

try(Presentation presentation = new Presentation()) {
    DocumentProperties documentProperties = presentation.getDocumentProperties();
    documentProperties.setAuthor("Jane Doe");
    documentProperties.setTitle("Innovating for the Future: Trends in Sustainable Technology");
    documentProperties.setCompany("GreenTech Solutions Inc.");
    documentProperties.setKeywords("Sustainability, Green Technology, Innovation");

    // Perform additional presentation processing logic.
}

Custom Document Properties

The getDocumentProperties() method allows you to access custom document properties.

Use the add method to create a custom property.

Supported property types include:

  • String
  • Boolean
  • Int
  • Double
  • DateTime

The following code snippet creates new custom properties:

The following code snippet adds custom properties to the presentation metadata:

IDocumentCustomPropertyDictionary customProperties =
        presentation.getDocumentProperties().getCustomProperties();

// Add custom properties to the dictionary.
customProperties.put("string property", new DocumentCustomProperty("string"));
customProperties.put("boolean property", new DocumentCustomProperty(true));
customProperties.put("date property", new DocumentCustomProperty(Instant.now()));
customProperties.put("int property", new DocumentCustomProperty(5));
customProperties.put("double property", new DocumentCustomProperty(2.55));

// Get a custom property by key.
var propertyValue = customProperties.get("string property").getValue();

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject

Methods

deepClone() Method

Clones the current DocumentProperties instance.

Declaration

public DocumentProperties deepClone()

Returns

Type Description
DocumentProperties

The cloned DocumentProperties instance.

getApplication() Method

Returns the name of the application that created this presentation.

Declaration

public String getApplication()

Returns

Type Description
String

The name of the application.

getAuthor() Method

Returns the presentation author.

Declaration

public String getAuthor()

Returns

Type Description
String

The author name.

getCategory() Method

Returns the categorization of the presentation content.

Declaration

public String getCategory()

Returns

Type Description
String

The category name.

getCompany() Method

Returns the name of the company associated with the presentation.

Declaration

public String getCompany()

Returns

Type Description
String

The company name.

getContentStatus() Method

Returns the status of the content (for example, Draft, Reviewed, or Final).

Declaration

public String getContentStatus()

Returns

Type Description
String

The content status.

getCreated() Method

Returns the date and time when the document was first saved. Sets automatically to the local date and time when the presentation is created.

Declaration

public Instant getCreated()

Returns

Type Description
Instant

The creation date and time.

getCustomProperties() Method

Returns a dictionary of custom document properties.

Declaration

public IDocumentCustomPropertyDictionary getCustomProperties()

Returns

Type Description
IDocumentCustomPropertyDictionary

A dictionary of custom document properties.

getDescription() Method

Returns a short description of the presentation content.

Declaration

public String getDescription()

Returns

Type Description
String

The content description. The string is limited in length to 255 characters.

getDocumentRevision() Method

Returns the presentation revision number.

Declaration

public String getDocumentRevision()

Returns

Type Description
String

A positive integer that indicates the number of saves or revisions.

Remarks

The getDocumentRevision() method does not return an updated value automatically when you modify and save the presentation.

getDocumentVersion() Method

Returns the document version number specified by the user or application.

Declaration

public String getDocumentVersion()

Returns

Type Description
String

The version number.

getHiddenSlides() Method

Returns the number of hidden slides in the presentation.

Declaration

public int getHiddenSlides()

Returns

Type Description
int

The number of hidden slides.

getKeywords() Method

Returns the delimited set of keywords to support searching and indexing.

Declaration

public String getKeywords()

Returns

Type Description
String

The delimited set of keywords.

getLastModifiedBy() Method

Returns the name of the user who last modified and saved the presentation. This property is updated automatically.

Declaration

public String getLastModifiedBy()

Returns

Type Description
String

The name of the user who last modified and saved the presentation.

getManager() Method

Returns the name of the supervisor associated with the presentation.

Declaration

public String getManager()

Returns

Type Description
String

The supervisor name.

getModified() Method

Returns the date and time the presentation was last saved. This property is updated automatically to the local date and time.

Declaration

public Instant getModified()

Returns

Type Description
Instant

The date and time of the last modification.

getNotes() Method

Returns the number of slides in the presentation that contain notes.

Declaration

public int getNotes()

Returns

Type Description
int

The number of slides that contain notes.

getPresentationFormat() Method

Returns the intended format for a presentation.

Declaration

public String getPresentationFormat()

Returns

Type Description
String

The intended presentation format.

getPrinted() Method

Returns the date and time on which the document was last printed. This property is updated automatically to the local date and time.

Declaration

public Instant getPrinted()

Returns

Type Description
Instant

The date and time when the presentation was last printed.

getSecurity() Method

Returns the presentation security level.

Declaration

public DocumentSecurityType getSecurity()

Returns

Type Description
DocumentSecurityType

An enumeration value that indicates the security level.

getSlides() Method

Returns the number of slides in the presentation.

Declaration

public int getSlides()

Returns

Type Description
int

The number of slides.

getSubject() Method

Returns the subject of the presentation.

Declaration

public String getSubject()

Returns

Type Description
String

The presentation subject. The string is limited in length to 255 characters.

getTitle() Method

Returns the presentation title.

Declaration

public String getTitle()

Returns

Type Description
String

The presentation title. The string is limited in length to 255 characters.

getVersion() Method

Returns the version of the application used to create or modify the document.

Declaration

public String getVersion()

Returns

Type Description
String

The version number.

setApplication(String value) Method

Sets an application that created this presentation.

Declaration

public void setApplication(String value)

Parameters

Name Type Description
value String

The name of the application.

setAuthor(String value) Method

Sets the presentation author.

Declaration

public void setAuthor(String value)

Parameters

Name Type Description
value String

The author name.

setCategory(String value) Method

Sets the categorization of the presentation content.

Declaration

public void setCategory(String value)

Parameters

Name Type Description
value String

The category name.

setCompany(String value) Method

Sets the name of the company associated with the presentation.

Declaration

public void setCompany(String value)

Parameters

Name Type Description
value String

The company name.

setContentStatus(String value) Method

Sets the status of the content (for example, Draft, Reviewed, or Final).

Declaration

public void setContentStatus(String value)

Parameters

Name Type Description
value String

The content status.

setCreated(Instant value) Method

Sets the date and time when the document was first saved. Called automatically to specify the local date and time when the presentation is created.

Declaration

public void setCreated(Instant value)

Parameters

Name Type Description
value Instant

The creation date and time.

setDescription(String value) Method

Sets a short description of the presentation content.

Declaration

public void setDescription(String value)

Parameters

Name Type Description
value String

The content description. The string is limited in length to 255 characters.

setDocumentRevision(String value) Method

Sets the presentation revision number.

Declaration

public void setDocumentRevision(String value)

Parameters

Name Type Description
value String

A positive integer that indicates the number of saves or revisions.

Remarks

The getDocumentRevision() method does not return an updated value automatically when you modify and save the presentation.

setDocumentVersion(String value) Method

Sets the document version number specified by the user or application.

Declaration

public void setDocumentVersion(String value)

Parameters

Name Type Description
value String

The version number.

setKeywords(String value) Method

Sets the delimited set of keywords to support searching and indexing.

Declaration

public void setKeywords(String value)

Parameters

Name Type Description
value String

The delimited set of keywords.

setLastModifiedBy(String value) Method

Sets the name of the user who last modified and saved the presentation. This property is updated automatically.

Declaration

public void setLastModifiedBy(String value)

Parameters

Name Type Description
value String

The name of the user who last modified and saved the presentation.

setManager(String value) Method

Sets the name of the supervisor associated with the presentation.

Declaration

public void setManager(String value)

Parameters

Name Type Description
value String

The supervisor name.

setModified(Instant value) Method

Sets the date and time the presentation was last saved. This property is updated automatically to the local date and time.

Declaration

public void setModified(Instant value)

Parameters

Name Type Description
value Instant

The date and time of the last modification.

setPrinted(Instant value) Method

Sets the date and time on which the document was last printed. This property is updated automatically to the local date and time.

Declaration

public void setPrinted(Instant value)

Parameters

Name Type Description
value Instant

The date and time when the presentation was last printed.

setSubject(String value) Method

Sets the subject of the presentation.

Declaration

public void setSubject(String value)

Parameters

Name Type Description
value String

The presentation subject. The string is limited in length to 255 characters.

setTitle(String value) Method

Sets the presentation title.

Declaration

public void setTitle(String value)

Parameters

Name Type Description
value String

The presentation title. The string is limited in length to 255 characters.

setVersion(String value) Method

Sets the version of the application used to create or modify the document.

Declaration

public void setVersion(String value)

Parameters

Name Type Description
value String

The version number.