com.aspose.words

Class BuiltInDocumentProperties

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}", doc.getOriginalFileName()));

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

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

Property Getters/Setters Summary
java.lang.StringgetAuthor()
void
setAuthor(java.lang.Stringvalue)
           Gets or sets the name of the document's author.
intgetBytes()
void
setBytes(intvalue)
           Represents an estimate of the number of bytes in the document.
java.lang.StringgetCategory()
void
setCategory(java.lang.Stringvalue)
           Gets or sets the category of the document.
intgetCharacters()
void
setCharacters(intvalue)
           Represents an estimate of the number of characters in the document.
intgetCharactersWithSpaces()
void
           Represents an estimate of the number of characters (including spaces) in the document.
java.lang.StringgetComments()
void
setComments(java.lang.Stringvalue)
           Gets or sets the document comments.
java.lang.StringgetCompany()
void
setCompany(java.lang.Stringvalue)
           Gets or sets the company property.
java.lang.StringgetContentStatus()
void
setContentStatus(java.lang.Stringvalue)
           Gets or sets the ContentStatus of the document.
java.lang.StringgetContentType()
void
setContentType(java.lang.Stringvalue)
           Gets or sets the ContentStatus of the document.
intgetCount()
Gets number of items in the collection.
java.util.DategetCreatedTime()
void
setCreatedTime(java.util.Datevalue)
           Gets or sets date of the document creation in UTC.
java.lang.Object[]getHeadingPairs()
void
setHeadingPairs(java.lang.Object[]value)
           Specifies document headings and their names.
java.lang.StringgetHyperlinkBase()
void
setHyperlinkBase(java.lang.Stringvalue)
           Specifies the base string used for evaluating relative hyperlinks in this document.
java.lang.StringgetKeywords()
void
setKeywords(java.lang.Stringvalue)
           Gets or sets the document keywords.
java.util.DategetLastPrinted()
void
setLastPrinted(java.util.Datevalue)
           Gets or sets the date when the document was last printed in UTC.
java.lang.StringgetLastSavedBy()
void
setLastSavedBy(java.lang.Stringvalue)
           Gets or sets the name of the last author.
java.util.DategetLastSavedTime()
void
setLastSavedTime(java.util.Datevalue)
           Gets or sets the time of the last save in UTC.
intgetLines()
void
setLines(intvalue)
           Represents an estimate of the number of lines in the document.
booleangetLinksUpToDate()
void
setLinksUpToDate(booleanvalue)
           Indicates whether hyperlinks in a document are up-to-date.
java.lang.StringgetManager()
void
setManager(java.lang.Stringvalue)
           Gets or sets the manager property.
java.lang.StringgetNameOfApplication()
void
setNameOfApplication(java.lang.Stringvalue)
           Gets or sets the name of the application.
intgetPages()
void
setPages(intvalue)
           Represents an estimate of the number of pages in the document.
intgetParagraphs()
void
setParagraphs(intvalue)
           Represents an estimate of the number of paragraphs in the document.
intgetRevisionNumber()
void
           Gets or sets the document revision number.
intgetSecurity()
void
setSecurity(intvalue)
           Specifies the security level of a document as a numeric value. The value of the property is DocumentSecurity integer constant.
java.lang.StringgetSubject()
void
setSubject(java.lang.Stringvalue)
           Gets or sets the subject of the document.
java.lang.StringgetTemplate()
void
setTemplate(java.lang.Stringvalue)
           Gets or sets the informational name of the document template.
byte[]getThumbnail()
void
setThumbnail(byte[]value)
          

Gets or sets the thumbnail of the document.

java.lang.StringgetTitle()
void
setTitle(java.lang.Stringvalue)
           Gets or sets the title of the document.
java.lang.String[]getTitlesOfParts()
void
setTitlesOfParts(java.lang.String[]value)
           Each string in the array specifies the name of a part in the document.
intgetTotalEditingTime()
void
           Gets or sets the total editing time in minutes.
intgetVersion()
void
setVersion(intvalue)
           Represents the version number of the application that created the document.
intgetWords()
void
setWords(intvalue)
           Represents an estimate of the number of words in the document.
DocumentPropertyget(int index)
Returns a DocumentProperty object by index.
DocumentPropertyget(java.lang.String name)
Returns a DocumentProperty object by the name of the property.
 
Method Summary
voidclear()
Removes all properties from the collection.
booleancontains(java.lang.String name)
Returns true if a property with the specified name exists in the collection.
intindexOf(java.lang.String name)
Gets the index of a property by name.
java.util.Iterator<DocumentProperty>iterator()
Returns an iterator object that can be used to iterate over all items in the collection.
voidremove(java.lang.String name)
Removes a property with the specified name from the collection.
voidremoveAt(int index)
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

        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 docProperty = doc.getBuiltInDocumentProperties().get(i);
            System.out.println(MessageFormat.format("{0}({1}) : {2}", docProperty.getName(), docProperty.getType(), docProperty.getValue()));
        }
        
        System.out.println("3. Custom Properties");
        for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++)
        {
            DocumentProperty docProperty = doc.getCustomDocumentProperties().get(i);
            System.out.println(MessageFormat.format("{0}({1}) : {2}", docProperty.getName(), docProperty.getType(), docProperty.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 updates this property when you call Document.updateWordCount(boolean).

        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

        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 docProperty = doc.getBuiltInDocumentProperties().get(i);
            System.out.println(MessageFormat.format("{0}({1}) : {2}", docProperty.getName(), docProperty.getType(), docProperty.getValue()));
        }
        
        System.out.println("3. Custom Properties");
        for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++)
        {
            DocumentProperty docProperty = doc.getCustomDocumentProperties().get(i);
            System.out.println(MessageFormat.format("{0}({1}) : {2}", docProperty.getName(), docProperty.getType(), docProperty.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 docProperty = doc.getBuiltInDocumentProperties().get("Keywords");
        System.out.println(docProperty.toString());
    • Method Detail

      • clear

        public void clear()
        Removes all properties from the collection.
      • contains

        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

        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

        public java.util.Iterator<DocumentProperty> iterator()
        Returns an iterator object that can be used to iterate over all items in the collection.
      • remove

        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

        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.