java.lang.ObjectDocumentPropertyCollection
com.aspose.words.BuiltInDocumentProperties
public class BuiltInDocumentProperties
Provides access to The names of the properties are case-insensitive. The properties in the collection are sorted alphabetically by name. Example:
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);
System.out.println(MessageFormat.format("1. Document name: {0}", fileName));
System.out.println("2. Built-in Properties");
for (DocumentProperty prop : doc.getBuiltInDocumentProperties())
System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue()));
System.out.println("3. Custom Properties");
for (DocumentProperty prop : doc.getCustomDocumentProperties())
System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue()));
Property Getters/Setters Summary | ||
---|---|---|
java.lang.String | getAuthor() | |
void | setAuthor(java.lang.String value) | |
Gets or sets the name of the document's author. | ||
int | getBytes() | |
void | setBytes(int value) | |
Represents an estimate of the number of bytes in the document. | ||
java.lang.String | getCategory() | |
void | setCategory(java.lang.String value) | |
Gets or sets the category of the document. | ||
int | getCharacters() | |
void | setCharacters(int value) | |
Represents an estimate of the number of characters in the document. | ||
int | getCharactersWithSpaces() | |
void | setCharactersWithSpaces(int value) | |
Represents an estimate of the number of characters (including spaces) in the document. | ||
java.lang.String | getComments() | |
void | setComments(java.lang.String value) | |
Gets or sets the document comments. | ||
java.lang.String | getCompany() | |
void | setCompany(java.lang.String value) | |
Gets or sets the company property. | ||
java.lang.String | getContentStatus() | |
void | setContentStatus(java.lang.String value) | |
Gets or sets the ContentStatus of the document. | ||
java.lang.String | getContentType() | |
void | setContentType(java.lang.String value) | |
Gets or sets the ContentStatus of the document. | ||
int | getCount() | → inherited from DocumentPropertyCollection |
Gets number of items in the collection. | ||
java.util.Date | getCreatedTime() | |
void | setCreatedTime(java.util.Date value) | |
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.String | getHyperlinkBase() | |
void | setHyperlinkBase(java.lang.String value) | |
Specifies the base string used for evaluating relative hyperlinks in this document. | ||
java.lang.String | getKeywords() | |
void | setKeywords(java.lang.String value) | |
Gets or sets the document keywords. | ||
java.util.Date | getLastPrinted() | |
void | setLastPrinted(java.util.Date value) | |
Gets or sets the date when the document was last printed in UTC. | ||
java.lang.String | getLastSavedBy() | |
void | setLastSavedBy(java.lang.String value) | |
Gets or sets the name of the last author. | ||
java.util.Date | getLastSavedTime() | |
void | setLastSavedTime(java.util.Date value) | |
Gets or sets the time of the last save in UTC. | ||
int | getLines() | |
void | setLines(int value) | |
Represents an estimate of the number of lines in the document. | ||
boolean | getLinksUpToDate() | |
void | setLinksUpToDate(boolean value) | |
Indicates whether hyperlinks in a document are up-to-date. | ||
java.lang.String | getManager() | |
void | setManager(java.lang.String value) | |
Gets or sets the manager property. | ||
java.lang.String | getNameOfApplication() | |
void | setNameOfApplication(java.lang.String value) | |
Gets or sets the name of the application. | ||
int | getPages() | |
void | setPages(int value) | |
Represents an estimate of the number of pages in the document. | ||
int | getParagraphs() | |
void | setParagraphs(int value) | |
Represents an estimate of the number of paragraphs in the document. | ||
int | getRevisionNumber() | |
void | setRevisionNumber(int value) | |
Gets or sets the document revision number. | ||
int | getSecurity() | |
void | setSecurity(int value) | |
Specifies the security level of a document as a numeric value. The value of the property is DocumentSecurity integer constant. | ||
java.lang.String | getSubject() | |
void | setSubject(java.lang.String value) | |
Gets or sets the subject of the document. | ||
java.lang.String | getTemplate() | |
void | setTemplate(java.lang.String value) | |
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.String | getTitle() | |
void | setTitle(java.lang.String value) | |
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. | ||
int | getTotalEditingTime() | |
void | setTotalEditingTime(int value) | |
Gets or sets the total editing time in minutes. | ||
int | getVersion() | |
void | setVersion(int value) | |
Represents the version number of the application that created the document. | ||
int | getWords() | |
void | setWords(int value) | |
Represents an estimate of the number of words in the document. | ||
DocumentProperty | get(int index) | → inherited from DocumentPropertyCollection |
Returns a |
||
DocumentProperty | get(java.lang.String name) | |
Returns a |
Method Summary | ||
---|---|---|
void | clear() | → inherited from DocumentPropertyCollection |
Removes all properties from the collection. | ||
boolean | contains(java.lang.String name) | → inherited from DocumentPropertyCollection |
Returns true if a property with the specified name exists in the collection. | ||
int | indexOf(java.lang.String name) | → inherited from DocumentPropertyCollection |
Gets the index of a property by name. | ||
java.util.Iterator | iterator() | → inherited from DocumentPropertyCollection |
Returns an iterator object that can be used to iterate over all items in the collection. | ||
void | remove(java.lang.String name) | → inherited from DocumentPropertyCollection |
Removes a property with the specified name from the collection. | ||
void | removeAt(int index) | → inherited from DocumentPropertyCollection |
Removes a property at the specified index. |
Property Getters/Setters Detail |
---|
getAuthor/setAuthor | |
public java.lang.String getAuthor() / public void setAuthor(java.lang.String value) |
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) |
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) |
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) |
Aspose.Words updates this property when you call
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) |
Aspose.Words updates this property when you call
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) |
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) |
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) |
getContentType/setContentType | |
public java.lang.String getContentType() / public void setContentType(java.lang.String value) |
getCount | → inherited from DocumentPropertyCollection |
public int getCount() |
Example:
Enumerates through all built-in and custom properties in a document using indexed access.String fileName = getMyDir() + "Properties.doc"; Document doc = new Document(fileName); System.out.println(MessageFormat.format("1. Document name: {0}", fileName)); System.out.println("2. Built-in Properties"); for (int i = 0; i < doc.getBuiltInDocumentProperties().getCount(); i++) { DocumentProperty prop = doc.getBuiltInDocumentProperties().get(i); System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue())); } System.out.println("3. Custom Properties"); for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++) { DocumentProperty prop = doc.getCustomDocumentProperties().get(i); System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue())); }
getCreatedTime/setCreatedTime | |
public java.util.Date getCreatedTime() / public void setCreatedTime(java.util.Date value) |
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) |
Every heading pair occupies two elements in this array.
The first element of the pair is a
The total sum of counts for all heading pairs in this property must be equal to the
number of elements in the
Aspose.Words does not update this property.
getHyperlinkBase/setHyperlinkBase | |
public java.lang.String getHyperlinkBase() / public void setHyperlinkBase(java.lang.String value) |
Aspose.Words does not use this property.
getKeywords/setKeywords | |
public java.lang.String getKeywords() / public void setKeywords(java.lang.String value) |
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) |
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) |
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) |
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) |
Aspose.Words does not update this property.
Example:
Retrieves information from the built-in document properties.String fileName = getMyDir() + "Properties.doc"; Document doc = new Document(fileName); System.out.println(MessageFormat.format("Document name: {0}", fileName)); System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor())); System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes())); System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory())); System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters())); System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces())); System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments())); System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany())); System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime())); System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords())); System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted())); System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy())); System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime())); System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines())); System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager())); System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication())); System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages())); System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs())); System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber())); System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject())); System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate())); System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle())); System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime())); System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion())); System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
getLinksUpToDate/setLinksUpToDate | |
public boolean getLinksUpToDate() / public void setLinksUpToDate(boolean value) |
Aspose.Words does not update this property.
getManager/setManager | |
public java.lang.String getManager() / public void setManager(java.lang.String value) |
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) |
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) |
Aspose.Words updates this property when you call
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) |
Aspose.Words updates this property when you call
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) |
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) |
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
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) |
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) |
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
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()));
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.
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) |
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) |
Aspose.Words does not update this property.
getTotalEditingTime/setTotalEditingTime | |
public int getTotalEditingTime() / public void setTotalEditingTime(int value) |
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) |
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) |
Aspose.Words updates this property when you call
Example:
Shows how to update all list labels in a document.Document doc = new Document(getMyDir() + "Document.doc"); // Some work should be done here that changes the document's content. // Update the word, character and paragraph count of the document. doc.updateWordCount(); // Display the updated document properties. System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters())); System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords())); System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs()));
Example:
Retrieves information from the built-in document properties.String fileName = getMyDir() + "Properties.doc"; Document doc = new Document(fileName); System.out.println(MessageFormat.format("Document name: {0}", fileName)); System.out.println(MessageFormat.format("Document author: {0}", doc.getBuiltInDocumentProperties().getAuthor())); System.out.println(MessageFormat.format("Bytes: {0}", doc.getBuiltInDocumentProperties().getBytes())); System.out.println(MessageFormat.format("Category: {0}", doc.getBuiltInDocumentProperties().getCategory())); System.out.println(MessageFormat.format("Characters: {0}", doc.getBuiltInDocumentProperties().getCharacters())); System.out.println(MessageFormat.format("Characters with spaces: {0}", doc.getBuiltInDocumentProperties().getCharactersWithSpaces())); System.out.println(MessageFormat.format("Comments: {0}", doc.getBuiltInDocumentProperties().getComments())); System.out.println(MessageFormat.format("Company: {0}", doc.getBuiltInDocumentProperties().getCompany())); System.out.println(MessageFormat.format("Create time: {0}", doc.getBuiltInDocumentProperties().getCreatedTime())); System.out.println(MessageFormat.format("Keywords: {0}", doc.getBuiltInDocumentProperties().getKeywords())); System.out.println(MessageFormat.format("Last printed: {0}", doc.getBuiltInDocumentProperties().getLastPrinted())); System.out.println(MessageFormat.format("Last saved by: {0}", doc.getBuiltInDocumentProperties().getLastSavedBy())); System.out.println(MessageFormat.format("Last saved: {0}", doc.getBuiltInDocumentProperties().getLastSavedTime())); System.out.println(MessageFormat.format("Lines: {0}", doc.getBuiltInDocumentProperties().getLines())); System.out.println(MessageFormat.format("Manager: {0}", doc.getBuiltInDocumentProperties().getManager())); System.out.println(MessageFormat.format("Name of application: {0}", doc.getBuiltInDocumentProperties().getNameOfApplication())); System.out.println(MessageFormat.format("Pages: {0}", doc.getBuiltInDocumentProperties().getPages())); System.out.println(MessageFormat.format("Paragraphs: {0}", doc.getBuiltInDocumentProperties().getParagraphs())); System.out.println(MessageFormat.format("Revision number: {0}", doc.getBuiltInDocumentProperties().getRevisionNumber())); System.out.println(MessageFormat.format("Subject: {0}", doc.getBuiltInDocumentProperties().getSubject())); System.out.println(MessageFormat.format("Template: {0}", doc.getBuiltInDocumentProperties().getTemplate())); System.out.println(MessageFormat.format("Title: {0}", doc.getBuiltInDocumentProperties().getTitle())); System.out.println(MessageFormat.format("Total editing time: {0}", doc.getBuiltInDocumentProperties().getTotalEditingTime())); System.out.println(MessageFormat.format("Version: {0}", doc.getBuiltInDocumentProperties().getVersion())); System.out.println(MessageFormat.format("Words: {0}", doc.getBuiltInDocumentProperties().getWords()));
get | → inherited from DocumentPropertyCollection |
public DocumentProperty get(int index) |
Note: In Java this method is slow because iterates over all nodes.
index
- Zero-based index of the Example:
Enumerates through all built-in and custom properties in a document using indexed access.String fileName = getMyDir() + "Properties.doc"; Document doc = new Document(fileName); System.out.println(MessageFormat.format("1. Document name: {0}", fileName)); System.out.println("2. Built-in Properties"); for (int i = 0; i < doc.getBuiltInDocumentProperties().getCount(); i++) { DocumentProperty prop = doc.getBuiltInDocumentProperties().get(i); System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue())); } System.out.println("3. Custom Properties"); for (int i = 0; i < doc.getCustomDocumentProperties().getCount(); i++) { DocumentProperty prop = doc.getCustomDocumentProperties().get(i); System.out.println(MessageFormat.format("{0}({1}) : {2}", prop.getName(), prop.getType(), prop.getValue())); }
get | |
public DocumentProperty get(java.lang.String name) |
The string names of the properties correspond to the names of the typed
properties available from
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
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.
name
- The case-insensitive name of the property to retrieve.Example:
Retrieves a built-in document property by name.Document doc = new Document(getMyDir() + "Properties.doc"); DocumentProperty prop = doc.getBuiltInDocumentProperties().get("Keywords"); System.out.println(prop.toString());
Method Detail |
---|
clear | → inherited from DocumentPropertyCollection |
public void clear() |
contains | → inherited from DocumentPropertyCollection |
public boolean contains(java.lang.String name) |
name
- The case-insensitive name of the property.indexOf | → inherited from DocumentPropertyCollection |
public int indexOf(java.lang.String name) |
Note: In Java this method is slow because iterates over all nodes.
name
- The case-insensitive name of the property.iterator | → inherited from DocumentPropertyCollection |
public java.util.Iterator iterator() |
remove | → inherited from DocumentPropertyCollection |
public void remove(java.lang.String name) |
name
- The case-insensitive name of the property.Example:
Removes a custom document property.Document doc = new Document(getMyDir() + "Properties.doc"); doc.getCustomDocumentProperties().remove("Authorized Date");
removeAt | → inherited from DocumentPropertyCollection |
public void removeAt(int index) |
Note: In Java this method is slow because iterates over all nodes.
index
- The zero based index.