|
java.lang.Object
DocumentPropertyCollection
com.aspose.words.BuiltInDocumentProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Cloneable, java.lang.Iterable
public class BuiltInDocumentProperties - extends DocumentPropertyCollection
A collection of built-in document properties.
Provides access to DocumentProperty objects by their names (using an indexer) and
via a set of typed properties that return values of appropriate types. The names of the properties are case-insensitive. The properties in the collection are sorted alphabetically by name. Example: Enumerates through all built-in and custom properties in a document.
String fileName = getMyDir() + "Properties.doc";
Document doc = new Document(fileName);
System.out.println(MessageFormat.format("1. Document name: {0}", fileName));
System.out.println("2. Buil-in Properties");
for (DocumentProperty prop : doc.getBuiltInDocumentProperties())
System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue()));
System.out.println("3. Custom Properties");
for (DocumentProperty prop : doc.getCustomDocumentProperties())
System.out.println(MessageFormat.format("{0} : {1}", prop.getName(), prop.getValue())); - See Also:
- Document, Document.BuiltInDocumentProperties, Document.CustomDocumentProperties
|