@Deprecated public final class DocFormat extends DocumentFormat<DocMetadata,DocMetadataProperty,DocumentInfo> implements IInspectable<DocInspectionResult,DocInspectionOptions>, IProtectableFormat, ISignedFormat, IDublinCore
Represents a word processing document.
Constructor and Description |
---|
DocFormat(InputStream input)
Deprecated.
Initializes a new instance of the
DocFormat class. |
DocFormat(InputStream input,
LoadOptions loadOptions)
Deprecated.
Initializes a new instance of the
DocFormat class. |
DocFormat(String fileName)
Deprecated.
Initializes a new instance of the
DocFormat class. |
DocFormat(String fileName,
LoadOptions loadOptions)
Deprecated.
Initializes a new instance of the
DocFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Deprecated.
Removes metadata found in the document.
|
void |
clearComments()
Deprecated.
Removes all comments presented in Word document.
|
protected void |
dispose(boolean disposing)
Deprecated.
Releases unmanaged and optionally managed resources.
|
DocComment[] |
extractComments()
Deprecated.
Extract an array of
DocComment presented in the document. |
DocComment[] |
extractComments(String author)
Deprecated.
Extracts an array of
DocComment presented in the document filtered by a specific author. |
DublinCoreMetadata |
getDublinCore()
Deprecated.
Retrieves the Dublin Core metadata.
|
int |
getPagesCount()
Deprecated.
Gets an estimate of the number of pages in the document.
|
RevisionCollection |
getRevisions()
Deprecated.
Gets a collection of revisions (tracked changes) that exist in this document.
|
int |
getType()
Deprecated.
Gets the type of the loaded file.
|
int |
getWordsCount()
Deprecated.
Gets an estimate of the number of words in the document.
|
boolean |
hasDigitalSignatures()
Deprecated.
Gets a value indicating whether the document contains a
DigitalSignature . |
DocInspectionResult |
inspectDocument()
Deprecated.
Inspects the document and returns hidden data presented in the document.
|
boolean |
isProtected()
Deprecated.
Gets a value indicating whether document is encrypted and requires a password to open.
|
void |
removeHiddenData(DocInspectionOptions options)
Deprecated.
Removes the hidden data.
|
void |
updateComment(int updatingCommentId,
DocComment comment)
Deprecated.
Updates a specific comment by its id.
|
clearBuiltInProperties, clearCustomProperties, extractDocumentProperties, getDocumentInfo, getDocumentProperties, getFileType, getThumbnail, readDocumentPropertyByKey, readPropertyByName, readThumbnail, setProperties
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public DocFormat(String fileName)
Initializes a new instance of the DocFormat
class.
fileName
- A string that contains the full name of the file from which to create a DocFormat
instance.public DocFormat(String fileName, LoadOptions loadOptions)
Initializes a new instance of the DocFormat
class.
fileName
- A string that contains the full name of the file from which to create a DocFormat
instance.loadOptions
- Additional options to use when loading a document.public DocFormat(InputStream input)
Initializes a new instance of the DocFormat
class.
input
- A stream that contains the data for this DocFormat
.public DocFormat(InputStream input, LoadOptions loadOptions)
Initializes a new instance of the DocFormat
class.
input
- A stream that contains the data for this DocFormat
.loadOptions
- Additional options to use when loading a document.public int getType()
Gets the type of the loaded file.
getType
in class FormatBase
public final boolean isProtected()
Gets a value indicating whether document is encrypted and requires a password to open.
isProtected
in interface IProtectableFormat
true
if document is protected; otherwise, false
.public final boolean hasDigitalSignatures()
Gets a value indicating whether the document contains a DigitalSignature
.
hasDigitalSignatures
in interface ISignedFormat
true
if the document has digital signatures; otherwise, false
.public final DublinCoreMetadata getDublinCore()
Retrieves the Dublin Core metadata.
getDublinCore
in interface IDublinCore
DublinCoreMetadata
if the appropriate package is found; otherwise, null.public void cleanMetadata()
Removes metadata found in the document.
cleanMetadata
in class FormatBase
public final DocComment[] extractComments()
Extract an array of DocComment
presented in the document.
DocComment
.
public final DocComment[] extractComments(String author)
Extracts an array of DocComment
presented in the document filtered by a specific author.
author
- Name of the author.
DocComment
.public final void clearComments()
Removes all comments presented in Word document.
public final void updateComment(int updatingCommentId, DocComment comment)
Updates a specific comment by its id.
updatingCommentId
- The updating comment identifier.comment
- The comment.public final RevisionCollection getRevisions()
Gets a collection of revisions (tracked changes) that exist in this document.
public final int getWordsCount()
Gets an estimate of the number of words in the document.
P:DocumentProperties.Words
property.public final int getPagesCount()
Gets an estimate of the number of pages in the document.
P:DocumentProperties.Pages
property.public final DocInspectionResult inspectDocument()
Inspects the document and returns hidden data presented in the document.
inspectDocument
in interface IInspectable<DocInspectionResult,DocInspectionOptions>
DocInspectionResult
.
public final void removeHiddenData(DocInspectionOptions options)
Removes the hidden data.
removeHiddenData
in interface IInspectable<DocInspectionResult,DocInspectionOptions>
options
- Inspection options.
protected void dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
dispose
in class FormatBase
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.Copyright © 2020. All rights reserved.