public class BuiltInDocumentProperties extends DocumentPropertyCollection
To learn more, visit the Work with Document Properties documentation article.
Provides access to DocumentProperty objects by their names (using an indexer) and via a set of typed properties that return values of appropriate types.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
| Modifier and Type | Method and Description |
|---|---|
DocumentProperty |
get(java.lang.String name)
DocumentProperty object. |
java.lang.String |
getAuthor()
Gets the name of the document's author.
|
int |
getBytes()
Represents an estimate of the number of bytes in the document.
|
java.lang.String |
getCategory()
Gets the category of the document.
|
int |
getCharacters()
Represents an estimate of the number of characters in the document.
|
int |
getCharactersWithSpaces()
Represents an estimate of the number of characters (including spaces) in the document.
|
java.lang.String |
getComments()
Gets the document comments.
|
java.lang.String |
getCompany()
Gets the company property.
|
java.lang.String |
getContentStatus()
Gets the ContentStatus of the document.
|
java.lang.String |
getContentType()
Gets the ContentStatus of the document.
|
java.util.Date |
getCreatedTime()
Gets date of the document creation in UTC.
|
java.lang.Object[] |
getHeadingPairs()
Specifies document headings and their names.
|
java.lang.String |
getHyperlinkBase()
Specifies the base string used for evaluating relative hyperlinks in this document.
|
java.lang.String |
getKeywords()
Gets the document keywords.
|
java.util.Date |
getLastPrinted()
Gets the date when the document was last printed in UTC.
|
java.lang.String |
getLastSavedBy()
Gets the name of the last author.
|
java.util.Date |
getLastSavedTime()
Gets the time of the last save in UTC.
|
int |
getLines()
Represents an estimate of the number of lines in the document.
|
boolean |
getLinksUpToDate()
Indicates whether hyperlinks in a document are up-to-date.
|
java.lang.String |
getManager()
Gets the manager property.
|
java.lang.String |
getNameOfApplication()
Gets the name of the application.
|
int |
getPages()
Represents an estimate of the number of pages in the document.
|
int |
getParagraphs()
Represents an estimate of the number of paragraphs in the document.
|
int |
getRevisionNumber()
Gets the document revision number.
|
int |
getSecurity()
Specifies the security level of a document as a numeric value.
|
java.lang.String |
getSubject()
Gets the subject of the document.
|
java.lang.String |
getTemplate()
Gets the informational name of the document template.
|
byte[] |
getThumbnail()
Gets or sets the thumbnail of the document.
|
java.lang.String |
getTitle()
Gets the title of the document.
|
java.lang.String[] |
getTitlesOfParts()
Each string in the array specifies the name of a part in the document.
|
int |
getTotalEditingTime()
Gets the total editing time in minutes.
|
int |
getVersion()
Represents the version number of the application that created the document.
|
int |
getWords()
Represents an estimate of the number of words in the document.
|
void |
setAuthor(java.lang.String value)
Sets the name of the document's author.
|
void |
setBytes(int value)
Represents an estimate of the number of bytes in the document.
|
void |
setCategory(java.lang.String value)
Sets the category of the document.
|
void |
setCharacters(int value)
Represents an estimate of the number of characters in the document.
|
void |
setCharactersWithSpaces(int value)
Represents an estimate of the number of characters (including spaces) in the document.
|
void |
setComments(java.lang.String value)
Sets the document comments.
|
void |
setCompany(java.lang.String value)
Sets the company property.
|
void |
setContentStatus(java.lang.String value)
Sets the ContentStatus of the document.
|
void |
setContentType(java.lang.String value)
Sets the ContentStatus of the document.
|
void |
setCreatedTime(java.util.Date value)
Sets date of the document creation in UTC.
|
void |
setHeadingPairs(java.lang.Object[] value)
Specifies document headings and their names.
|
void |
setHyperlinkBase(java.lang.String value)
Specifies the base string used for evaluating relative hyperlinks in this document.
|
void |
setKeywords(java.lang.String value)
Sets the document keywords.
|
void |
setLastPrinted(java.util.Date value)
Sets the date when the document was last printed in UTC.
|
void |
setLastSavedBy(java.lang.String value)
Sets the name of the last author.
|
void |
setLastSavedTime(java.util.Date value)
Sets the time of the last save in UTC.
|
void |
setLines(int value)
Represents an estimate of the number of lines in the document.
|
void |
setLinksUpToDate(boolean value)
Indicates whether hyperlinks in a document are up-to-date.
|
void |
setManager(java.lang.String value)
Sets the manager property.
|
void |
setNameOfApplication(java.lang.String value)
Sets the name of the application.
|
void |
setPages(int value)
Represents an estimate of the number of pages in the document.
|
void |
setParagraphs(int value)
Represents an estimate of the number of paragraphs in the document.
|
void |
setRevisionNumber(int value)
Sets the document revision number.
|
void |
setSecurity(int value)
Specifies the security level of a document as a numeric value.
|
void |
setSubject(java.lang.String value)
Sets the subject of the document.
|
void |
setTemplate(java.lang.String value)
Sets the informational name of the document template.
|
void |
setThumbnail(byte[] value)
Gets or sets the thumbnail of the document.
|
void |
setTitle(java.lang.String value)
Sets the title of the document.
|
void |
setTitlesOfParts(java.lang.String[] value)
Each string in the array specifies the name of a part in the document.
|
void |
setTotalEditingTime(int value)
Sets the total editing time in minutes.
|
void |
setVersion(int value)
Represents the version number of the application that created the document.
|
void |
setWords(int value)
Represents an estimate of the number of words in the document.
|
clear, contains, get, getCount, indexOf, iterator, remove, removeAtpublic DocumentProperty get(java.lang.String name)
DocumentProperty object.
DocumentProperty object by the name of the property.
The string names of the properties correspond to the names of the typed properties available from BuiltInDocumentProperties.
If you request a property that is not present in the document, but the name of the property is recognized as a valid built-in name, a new DocumentProperty is created, added to the collection and returned. The newly created property is assigned a default value (empty string, zero, false or DateTime.MinValue depending on the type of the built-in property).
If you request a property that is not present in the document and the name is not recognized as a built-in name, a null is returned.
get in class DocumentPropertyCollectionname - The case-insensitive name of the property to retrieve.DocumentProperty value.public java.lang.String getAuthor()
public void setAuthor(java.lang.String value)
value - The name of the document's author.public int getBytes()
Microsoft Word does not always set this property.
Aspose.Words does not update this property.
int value.public void setBytes(int value)
Microsoft Word does not always set this property.
Aspose.Words does not update this property.
value - The corresponding int value.public int getCharacters()
Aspose.Words updates this property when you call Document.updateWordCount().
int value.public void setCharacters(int value)
Aspose.Words updates this property when you call Document.updateWordCount().
value - The corresponding int value.public int getCharactersWithSpaces()
Aspose.Words updates this property when you call Document.updateWordCount().
int value.public void setCharactersWithSpaces(int value)
Aspose.Words updates this property when you call Document.updateWordCount().
value - The corresponding int value.public java.lang.String getComments()
public void setComments(java.lang.String value)
value - The document comments.public java.lang.String getCategory()
public void setCategory(java.lang.String value)
value - The category of the document.public java.lang.String getCompany()
public void setCompany(java.lang.String value)
value - The company property.public java.util.Date getCreatedTime()
For documents originated from RTF format this property returns local time of the author's machine at the moment of document creation.
Aspose.Words does not update this property.
public void setCreatedTime(java.util.Date value)
For documents originated from RTF format this property returns local time of the author's machine at the moment of document creation.
Aspose.Words does not update this property.
value - Date of the document creation in UTC.public java.lang.String getHyperlinkBase()
Aspose.Words does not use this property.
String value.public void setHyperlinkBase(java.lang.String value)
Aspose.Words does not use this property.
value - The corresponding String value.public java.lang.String getKeywords()
public void setKeywords(java.lang.String value)
value - The document keywords.public java.util.Date getLastPrinted()
For documents originated from RTF format this property returns the local time of last print operation.
If the document was never printed, this property will return DateTime.MinValue.
Aspose.Words does not update this property.
public void setLastPrinted(java.util.Date value)
For documents originated from RTF format this property returns the local time of last print operation.
If the document was never printed, this property will return DateTime.MinValue.
Aspose.Words does not update this property.
value - The date when the document was last printed in UTC.public java.lang.String getLastSavedBy()
Aspose.Words does not update this property.
public void setLastSavedBy(java.lang.String value)
Aspose.Words does not update this property.
value - The name of the last author.public java.util.Date getLastSavedTime()
For documents originated from RTF format this property returns the local time of last save operation.
Aspose.Words does not update this property.
public void setLastSavedTime(java.util.Date value)
For documents originated from RTF format this property returns the local time of last save operation.
Aspose.Words does not update this property.
value - The time of the last save in UTC.public int getLines()
Aspose.Words updates this property when you call Document.updateWordCount(boolean).
int value.public void setLines(int value)
Aspose.Words updates this property when you call Document.updateWordCount(boolean).
value - The corresponding int value.public boolean getLinksUpToDate()
Aspose.Words does not update this property.
boolean value.public void setLinksUpToDate(boolean value)
Aspose.Words does not update this property.
value - The corresponding boolean value.public java.lang.String getManager()
public void setManager(java.lang.String value)
value - The manager property.public java.lang.String getNameOfApplication()
public void setNameOfApplication(java.lang.String value)
value - The name of the application.public int getPages()
Aspose.Words updates this property when you call Document.updatePageLayout().
int value.public void setPages(int value)
Aspose.Words updates this property when you call Document.updatePageLayout().
value - The corresponding int value.public int getParagraphs()
Aspose.Words updates this property when you call Document.updateWordCount().
int value.public void setParagraphs(int value)
Aspose.Words updates this property when you call Document.updateWordCount().
value - The corresponding int value.public int getRevisionNumber()
Aspose.Words does not update this property.
public void setRevisionNumber(int value)
Aspose.Words does not update this property.
value - The document revision number.public int getSecurity()
Use this property for informational purposes only because Microsoft Word does not always set this property. This property is available in DOC and OOXML documents only.
To protect or unprotect a document use the M:Aspose.Words.Document.Protect(Aspose.Words.ProtectionType,System.String) and Document.unprotect() methods.
Aspose.Words updates this property to a correct value before saving a document.
int value. The returned value is a bitwise combination of DocumentSecurity constants.public void setSecurity(int value)
Use this property for informational purposes only because Microsoft Word does not always set this property. This property is available in DOC and OOXML documents only.
To protect or unprotect a document use the M:Aspose.Words.Document.Protect(Aspose.Words.ProtectionType,System.String) and Document.unprotect() methods.
Aspose.Words updates this property to a correct value before saving a document.
value - The corresponding int value. The value must be a bitwise combination of DocumentSecurity constants.public java.lang.String getSubject()
public void setSubject(java.lang.String value)
value - The subject of the document.public java.lang.String getTemplate()
In Microsoft Word, this property is for informational purposes only and usually contains only the file name of the template without the path.
Empty string means the document is attached to the Normal template.
To get or set the actual name of the attached template, use the Document.getAttachedTemplate() / Document.setAttachedTemplate(java.lang.String) property.
Document.getAttachedTemplate(),
Document.setAttachedTemplate(java.lang.String)public void setTemplate(java.lang.String value)
In Microsoft Word, this property is for informational purposes only and usually contains only the file name of the template without the path.
Empty string means the document is attached to the Normal template.
To get or set the actual name of the attached template, use the Document.getAttachedTemplate() / Document.setAttachedTemplate(java.lang.String) property.
value - The informational name of the document template.Document.getAttachedTemplate(),
Document.setAttachedTemplate(java.lang.String)public byte[] getThumbnail()
Gets or sets the thumbnail of the document.
For now this property is used only when a document is being exported to ePub, it's not read from and written to other document formats.
Image of arbitrary format can be set to this property, but the format is checked during export. IllegalStateException is thrown if the image is invalid or its format is unsupported for specific format of document.
Only gif, jpeg and png images can be used for ePub publication.
byte[] value.public void setThumbnail(byte[] value)
Gets or sets the thumbnail of the document.
For now this property is used only when a document is being exported to ePub, it's not read from and written to other document formats.
Image of arbitrary format can be set to this property, but the format is checked during export. IllegalStateException is thrown if the image is invalid or its format is unsupported for specific format of document.
Only gif, jpeg and png images can be used for ePub publication.
value - The corresponding byte[] value.public java.lang.String getTitle()
public void setTitle(java.lang.String value)
value - The title of the document.public int getTotalEditingTime()
public void setTotalEditingTime(int value)
value - The total editing time in minutes.public java.lang.String getContentType()
public void setContentType(java.lang.String value)
value - The ContentStatus of the document.public java.lang.String getContentStatus()
public void setContentStatus(java.lang.String value)
value - The ContentStatus of the document.public int getVersion()
When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.
int value.public void setVersion(int value)
When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.
value - The corresponding int value.public int getWords()
Aspose.Words updates this property when you call Document.updateWordCount().
int value.public void setWords(int value)
Aspose.Words updates this property when you call Document.updateWordCount().
value - The corresponding int value.public java.lang.Object[] getHeadingPairs()
Every heading pair occupies two elements in this array.
The first element of the pair is a String and specifies the heading name. The second element of the pair is an int and specifies the count of document parts for this heading in the getTitlesOfParts() / setTitlesOfParts(java.lang.String[]) property.
The total sum of counts for all heading pairs in this property must be equal to the number of elements in the getTitlesOfParts() / setTitlesOfParts(java.lang.String[]) property.
Aspose.Words does not update this property.
java.lang.Object[] value.getTitlesOfParts(),
setTitlesOfParts(java.lang.String[])public void setHeadingPairs(java.lang.Object[] value)
Every heading pair occupies two elements in this array.
The first element of the pair is a String and specifies the heading name. The second element of the pair is an int and specifies the count of document parts for this heading in the getTitlesOfParts() / setTitlesOfParts(java.lang.String[]) property.
The total sum of counts for all heading pairs in this property must be equal to the number of elements in the getTitlesOfParts() / setTitlesOfParts(java.lang.String[]) property.
Aspose.Words does not update this property.
value - The corresponding java.lang.Object[] value.getTitlesOfParts(),
setTitlesOfParts(java.lang.String[])public java.lang.String[] getTitlesOfParts()
Aspose.Words does not update this property.
java.lang.String[] value.getHeadingPairs(),
setHeadingPairs(java.lang.Object[])public void setTitlesOfParts(java.lang.String[] value)
Aspose.Words does not update this property.
value - The corresponding java.lang.String[] value.getHeadingPairs(),
setHeadingPairs(java.lang.Object[])