com.aspose.words
Class BuiltInDocumentProperties

java.lang.Object
  extended by DocumentPropertyCollection
      extended by com.aspose.words.BuiltInDocumentProperties
All Implemented Interfaces:
java.lang.Iterable

public class BuiltInDocumentProperties 
extends DocumentPropertyCollection

A collection of built-in document properties.

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.

Example:

Enumerates through all built-in and custom properties in a document.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("1. Document name: {0}", fileName));

System.out.println("2. Built-in Properties");
for (DocumentProperty prop : doc.getBuiltInDocumentProperties())
    System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue()));

System.out.println("3. Custom Properties");
for (DocumentProperty prop : doc.getCustomDocumentProperties())
    System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue()));
See Also:
Document, Document.BuiltInDocumentProperties, Document.CustomDocumentProperties

Property Getters/Setters Summary
java.lang.StringgetAuthor()
voidsetAuthor(java.lang.String value)
           Gets or sets the name of the document's author.
intgetBytes()
voidsetBytes(int value)
           Represents an estimate of the number of bytes in the document.
java.lang.StringgetCategory()
voidsetCategory(java.lang.String value)
           Gets or sets the category of the document.
intgetCharacters()
voidsetCharacters(int value)
           Represents an estimate of the number of characters in the document.
intgetCharactersWithSpaces()
voidsetCharactersWithSpaces(int value)
           Represents an estimate of the number of characters (including spaces) in the document.
java.lang.StringgetComments()
voidsetComments(java.lang.String value)
           Gets or sets the document comments.
java.lang.StringgetCompany()
voidsetCompany(java.lang.String value)
           Gets or sets the company property.
java.lang.StringgetContentStatus()
voidsetContentStatus(java.lang.String value)
           Gets or sets the ContentStatus of the document.
java.lang.StringgetContentType()
voidsetContentType(java.lang.String value)
           Gets or sets the ContentStatus of the document.
intgetCount()→ inherited from DocumentPropertyCollection
           Gets number of items in the collection.
java.util.DategetCreatedTime()
voidsetCreatedTime(java.util.Date value)
           Gets or sets date of the document creation in UTC.
java.lang.Object[]getHeadingPairs()
voidsetHeadingPairs(java.lang.Object[] value)
           Specifies document headings and their names.
java.lang.StringgetHyperlinkBase()
voidsetHyperlinkBase(java.lang.String value)
           Specifies the base string used for evaluating relative hyperlinks in this document.
java.lang.StringgetKeywords()
voidsetKeywords(java.lang.String value)
           Gets or sets the document keywords.
java.util.DategetLastPrinted()
voidsetLastPrinted(java.util.Date value)
           Gets or sets the date when the document was last printed in UTC.
java.lang.StringgetLastSavedBy()
voidsetLastSavedBy(java.lang.String value)
           Gets or sets the name of the last author.
java.util.DategetLastSavedTime()
voidsetLastSavedTime(java.util.Date value)
           Gets or sets the time of the last save in UTC.
intgetLines()
voidsetLines(int value)
           Represents an estimate of the number of lines in the document.
booleangetLinksUpToDate()
voidsetLinksUpToDate(boolean value)
           Indicates whether hyperlinks in a document are up-to-date.
java.lang.StringgetManager()
voidsetManager(java.lang.String value)
           Gets or sets the manager property.
java.lang.StringgetNameOfApplication()
voidsetNameOfApplication(java.lang.String value)
           Gets or sets the name of the application.
intgetPages()
voidsetPages(int value)
           Represents an estimate of the number of pages in the document.
intgetParagraphs()
voidsetParagraphs(int value)
           Represents an estimate of the number of paragraphs in the document.
intgetRevisionNumber()
voidsetRevisionNumber(int value)
           Gets or sets the document revision number.
intgetSecurity()
voidsetSecurity(int value)
           Specifies the security level of a document as a numeric value. The value of the property is DocumentSecurity integer constant.
java.lang.StringgetSubject()
voidsetSubject(java.lang.String value)
           Gets or sets the subject of the document.
java.lang.StringgetTemplate()
voidsetTemplate(java.lang.String value)
           Gets or sets the informational name of the document template.
byte[]getThumbnail()
voidsetThumbnail(byte[] value)
          

Gets or sets the thumbnail of the document.

java.lang.StringgetTitle()
voidsetTitle(java.lang.String value)
           Gets or sets the title of the document.
java.lang.String[]getTitlesOfParts()
voidsetTitlesOfParts(java.lang.String[] value)
           Each string in the array specifies the name of a part in the document.
intgetTotalEditingTime()
voidsetTotalEditingTime(int value)
           Gets or sets the total editing time in minutes.
intgetVersion()
voidsetVersion(int value)
           Represents the version number of the application that created the document.
intgetWords()
voidsetWords(int value)
           Represents an estimate of the number of words in the document.
DocumentPropertyget(int index)→ inherited from DocumentPropertyCollection
           Returns a DocumentProperty object by index.
DocumentPropertyget(java.lang.String name)
           Returns a DocumentProperty object by the name of the property.
 
Method Summary
voidclear()→ inherited from DocumentPropertyCollection
           Removes all properties from the collection.
booleancontains(java.lang.String name)→ inherited from DocumentPropertyCollection
           Returns true if a property with the specified name exists in the collection.
intindexOf(java.lang.String name)→ inherited from DocumentPropertyCollection
           Gets the index of a property by name.
java.util.Iteratoriterator()→ inherited from DocumentPropertyCollection
           Returns an iterator object that can be used to iterate over all items in the collection.
voidremove(java.lang.String name)→ inherited from DocumentPropertyCollection
           Removes a property with the specified name from the collection.
voidremoveAt(int index)→ inherited from DocumentPropertyCollection
           Removes a property at the specified index.
 

Property Getters/Setters Detail

getAuthor/setAuthor

public java.lang.String getAuthor() / public void setAuthor(java.lang.String value)
Gets or sets the name of the document's author.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getBytes/setBytes

public int getBytes() / public void setBytes(int value)
Represents an estimate of the number of bytes in the document.

Microsoft Word does not always set this property.

Aspose.Words does not update this property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getCategory/setCategory

public java.lang.String getCategory() / public void setCategory(java.lang.String value)
Gets or sets the category of the document.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getCharacters/setCharacters

public int getCharacters() / public void setCharacters(int value)
Represents an estimate of the number of characters in the document.

Aspose.Words updates this property when you call Document.updateWordCount().

Example:

Shows how to update all list labels in a document.
Document doc = new Document(getMyDir() + "Document.doc");

// Some work should be done here that changes the document's content.

// Update the word, character and paragraph count of the document.
doc.updateWordCount();

// Display the updated document properties.
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getCharactersWithSpaces/setCharactersWithSpaces

public int getCharactersWithSpaces() / public void setCharactersWithSpaces(int value)
Represents an estimate of the number of characters (including spaces) in the document.

Aspose.Words updates this property when you call Document.updateWordCount().

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getComments/setComments

public java.lang.String getComments() / public void setComments(java.lang.String value)
Gets or sets the document comments.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getCompany/setCompany

public java.lang.String getCompany() / public void setCompany(java.lang.String value)
Gets or sets the company property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getContentStatus/setContentStatus

public java.lang.String getContentStatus() / public void setContentStatus(java.lang.String value)
Gets or sets the ContentStatus of the document.

getContentType/setContentType

public java.lang.String getContentType() / public void setContentType(java.lang.String value)
Gets or sets the ContentStatus of the document.

getCount

→ inherited from DocumentPropertyCollection
public int getCount()
Gets number of items in the collection.

Example:

Enumerates through all built-in and custom properties in a document using indexed access.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("1. Document name: {0}", fileName));

System.out.println("2. Built-in Properties");
for (int i = 0; i < doc.getBuiltInDocumentProperties().getCount(); i++)
{
    DocumentProperty prop = doc.getBuiltInDocumentProperties().get(i);
    System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue()));
}

System.out.println("3. Custom Properties");
for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++)
{
    DocumentProperty prop = doc.getCustomDocumentProperties().get(i);
    System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue()));
}

getCreatedTime/setCreatedTime

public java.util.Date getCreatedTime() / public void setCreatedTime(java.util.Date value)
Gets or sets date of the document creation in UTC.

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.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getHeadingPairs/setHeadingPairs

public java.lang.Object[] getHeadingPairs() / public void setHeadingPairs(java.lang.Object[] value)
Specifies document headings and their names.

Every heading pair occupies two elements in this array.

The first element of the pair is a java.lang.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 TitlesOfParts property.

The total sum of counts for all heading pairs in this property must be equal to the number of elements in the TitlesOfParts property.

Aspose.Words does not update this property.

See Also:
TitlesOfParts

getHyperlinkBase/setHyperlinkBase

public java.lang.String getHyperlinkBase() / public void setHyperlinkBase(java.lang.String value)
Specifies the base string used for evaluating relative hyperlinks in this document.

Aspose.Words does not use this property.


getKeywords/setKeywords

public java.lang.String getKeywords() / public void setKeywords(java.lang.String value)
Gets or sets the document keywords.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getLastPrinted/setLastPrinted

public java.util.Date getLastPrinted() / public void setLastPrinted(java.util.Date value)
Gets or sets the date when the document was last printed in UTC.

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.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getLastSavedBy/setLastSavedBy

public java.lang.String getLastSavedBy() / public void setLastSavedBy(java.lang.String value)
Gets or sets the name of the last author.

Aspose.Words does not update this property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getLastSavedTime/setLastSavedTime

public java.util.Date getLastSavedTime() / public void setLastSavedTime(java.util.Date value)
Gets or sets the time of the last save in UTC.

For documents originated from RTF format this property returns the local time of last save operation.

Aspose.Words does not update this property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getLines/setLines

public int getLines() / public void setLines(int value)
Represents an estimate of the number of lines in the document.

Aspose.Words does not update this property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getLinksUpToDate/setLinksUpToDate

public boolean getLinksUpToDate() / public void setLinksUpToDate(boolean value)
Indicates whether hyperlinks in a document are up-to-date.

Aspose.Words does not update this property.


getManager/setManager

public java.lang.String getManager() / public void setManager(java.lang.String value)
Gets or sets the manager property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getNameOfApplication/setNameOfApplication

public java.lang.String getNameOfApplication() / public void setNameOfApplication(java.lang.String value)
Gets or sets the name of the application.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getPages/setPages

public int getPages() / public void setPages(int value)
Represents an estimate of the number of pages in the document.

Aspose.Words updates this property when you call Document.updatePageLayout().

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getParagraphs/setParagraphs

public int getParagraphs() / public void setParagraphs(int value)
Represents an estimate of the number of paragraphs in the document.

Aspose.Words updates this property when you call Document.updateWordCount().

Example:

Shows how to update all list labels in a document.
Document doc = new Document(getMyDir() + "Document.doc");

// Some work should be done here that changes the document's content.

// Update the word, character and paragraph count of the document.
doc.updateWordCount();

// Display the updated document properties.
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getRevisionNumber/setRevisionNumber

public int getRevisionNumber() / public void setRevisionNumber(int value)
Gets or sets the document revision number.

Aspose.Words does not update this property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getSecurity/setSecurity

public int getSecurity() / public void setSecurity(int value)
Specifies the security level of a document as a numeric value. The value of the property is DocumentSecurity integer constant.

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 Document.protect(int,java.lang.String) and Document.unprotect() methods.

Aspose.Words updates this property to a correct value before saving a document.


getSubject/setSubject

public java.lang.String getSubject() / public void setSubject(java.lang.String value)
Gets or sets the subject of the document.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getTemplate/setTemplate

public java.lang.String getTemplate() / public void setTemplate(java.lang.String value)
Gets or sets the informational name of the document template.

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.AttachedTemplate property.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
See Also:
Document.AttachedTemplate

getThumbnail/setThumbnail

public byte[] getThumbnail() / 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. System.InvalidOperationException 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.


getTitle/setTitle

public java.lang.String getTitle() / public void setTitle(java.lang.String value)
Gets or sets the title of the document.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getTitlesOfParts/setTitlesOfParts

public java.lang.String[] getTitlesOfParts() / public void setTitlesOfParts(java.lang.String[] value)
Each string in the array specifies the name of a part in the document.

Aspose.Words does not update this property.

See Also:
HeadingPairs

getTotalEditingTime/setTotalEditingTime

public int getTotalEditingTime() / public void setTotalEditingTime(int value)
Gets or sets the total editing time in minutes.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getVersion/setVersion

public int getVersion() / public void setVersion(int value)
Represents the version number of the application that created the document.

When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

getWords/setWords

public int getWords() / public void setWords(int value)
Represents an estimate of the number of words in the document.

Aspose.Words updates this property when you call Document.updateWordCount().

Example:

Shows how to update all list labels in a document.
Document doc = new Document(getMyDir() + "Document.doc");

// Some work should be done here that changes the document's content.

// Update the word, character and paragraph count of the document.
doc.updateWordCount();

// Display the updated document properties.
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));

Example:

Retrieves information from the built-in document properties.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("Document name: {0}", fileName));
System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor()));
System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes()));
System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory()));
System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters()));
System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces()));
System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments()));
System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany()));
System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime()));
System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords()));
System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted()));
System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy()));
System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime()));
System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines()));
System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager()));
System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication()));
System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages()));
System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber()));
System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject()));
System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate()));
System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle()));
System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime()));
System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion()));
System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));

get

→ inherited from DocumentPropertyCollection
public DocumentProperty get(int index)
Returns a DocumentProperty object by index.

Note: In Java this method is slow because iterates over all nodes.

Parameters:
index - Zero-based index of the DocumentProperty to retrieve.

Example:

Enumerates through all built-in and custom properties in a document using indexed access.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);

System.out.println(MessageFormat.format("1. Document name: {0}", fileName));

System.out.println("2. Built-in Properties");
for (int i = 0; i < doc.getBuiltInDocumentProperties().getCount(); i++)
{
    DocumentProperty prop = doc.getBuiltInDocumentProperties().get(i);
    System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue()));
}

System.out.println("3. Custom Properties");
for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++)
{
    DocumentProperty prop = doc.getCustomDocumentProperties().get(i);
    System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue()));
}

get

public DocumentProperty get(java.lang.String name)
Returns a 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.

Parameters:
name - The case-insensitive name of the property to retrieve.

Example:

Retrieves a built-in document property by name.
Document doc = new Document(getMyDir() + "Properties.doc");

DocumentProperty prop = doc.getBuiltInDocumentProperties().get("Keywords");
System.out.println(prop.toString());

Method Detail

clear

→ inherited from DocumentPropertyCollection
public void clear()
Removes all properties from the collection.

contains

→ inherited from DocumentPropertyCollection
public boolean contains(java.lang.String name)
Returns true if a property with the specified name exists in the collection.
Parameters:
name - The case-insensitive name of the property.
Returns:
True if the property exists in the collection; false otherwise.

indexOf

→ inherited from DocumentPropertyCollection
public int indexOf(java.lang.String name)
Gets the index of a property by name.

Note: In Java this method is slow because iterates over all nodes.

Parameters:
name - The case-insensitive name of the property.
Returns:
The zero based index. Negative value if not found.

iterator

→ inherited from DocumentPropertyCollection
public java.util.Iterator iterator()
Returns an iterator object that can be used to iterate over all items in the collection.

remove

→ inherited from DocumentPropertyCollection
public void remove(java.lang.String name)
Removes a property with the specified name from the collection.
Parameters:
name - The case-insensitive name of the property.

Example:

Removes a custom document property.
Document doc = new Document(getMyDir() + "Properties.doc");

doc.getCustomDocumentProperties().remove("Authorized Date");

removeAt

→ inherited from DocumentPropertyCollection
public void removeAt(int index)
Removes a property at the specified index.

Note: In Java this method is slow because iterates over all nodes.

Parameters:
index - The zero based index.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.