public final class Editor extends Object implements IAuxDisposable
Main class, which encapsulates conversion methods
Modifier and Type | Field and Description |
---|---|
com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> |
Disposed |
Constructor and Description |
---|
Editor(InputStream document)
Initializes new Editor instance with specified input document (as a
stream)
|
Editor(InputStream document,
ILoadOptions loadOptions)
Initializes new Editor instance with specified input document (as a
stream) with its load options
|
Editor(InputStream document,
ILoadOptions loadOptions,
com.groupdocs.editor.EditorSettings settings)
Initializes new Editor instance with specified input document (as a
stream) with its load options and Editor settings
|
Editor(String filePath)
Initializes new Editor instance with specified input document (as a full
file path)
|
Editor(String filePath,
ILoadOptions loadOptions)
Initializes new Editor instance with specified input document (as a full file path) with its load options
|
Editor(String filePath,
ILoadOptions loadOptions,
com.groupdocs.editor.EditorSettings settings)
Initializes new Editor instance with specified input document (as a full
file path) with its load options and Editor settings
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this instance of Editor, so that it releases all internal
resources and becomes unavailable for further usage
|
EditableDocument |
edit()
Opens a previously loaded document for editing using default options by
generating and returning an instance of 'EditableDocument' class, that,
in turn, contains methods for producing HTML markup and associated
resources.
|
EditableDocument |
edit(IEditOptions editOptions)
Opens a previously loaded document for editing using specified
format-specific options by generating and returning an instance of
'EditableDocument' class, that, in turn, contains methods for producing
HTML markup and associated resources.
|
IDocumentInfo |
getDocumentInfo(String password)
Returns metadata about the document, that was loaded to this 'Editor'
instance
|
boolean |
isDisposed()
Indicates whether this Editor instance was already disposed and cannot be
used anymore (true) or not and is active (false)
|
void |
save(EditableDocument inputDocument,
OutputStream outputDocument,
ISaveOptions saveOptions)
Converts specified edited document, represented as instance of
'EditableDocument', to the resultant document of specified format and
saves its content to specified stream
|
void |
save(EditableDocument inputDocument,
String filePath,
ISaveOptions saveOptions)
Converts specified edited document, represented as instance of
'EditableDocument', to the resultant document of specified format and
saves its content to file by specified file path
|
public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> Disposed
public Editor(InputStream document)
Initializes new Editor instance with specified input document (as a stream)
document
- Delegate, that should return a stream with document
content. Should not be NULL.public Editor(InputStream document, ILoadOptions loadOptions)
Initializes new Editor instance with specified input document (as a stream) with its load options
document
- Delegate, that should return a stream with document
content. Should not be NULL.loadOptions
- Delegate, that should return a document load options.
May be NULL and may return null - in that case document type will be
detected automatically and default load options for that type will be
applied.public Editor(InputStream document, ILoadOptions loadOptions, com.groupdocs.editor.EditorSettings settings)
Initializes new Editor instance with specified input document (as a stream) with its load options and Editor settings
document
- Delegate, that should return a stream with document
content. Should not be NULL.loadOptions
- Delegate, that should return a document load options.
May be NULL and may return null - in that case document type will be
detected automatically and default load options for that type will be
applied.settings
- Delegate, that returns Editor settings, which allow to
set custom logger or caching. May be NULL - in that case Editor will use
own settings.public Editor(String filePath)
Initializes new Editor instance with specified input document (as a full file path)
filePath
- Full path to the file. Should not be NULL. Should be
valid, and file should exist.public Editor(String filePath, ILoadOptions loadOptions)
Initializes new Editor instance with specified input document (as a full file path) with its load options
filePath
- Full path to the file. Should not be NULL. Should be valid, and file should exist.loadOptions
- Delegate, that should return a document load options. May be NULL and may return null -
in that case document type will be detected automatically and default load options for that type will be applied.public Editor(String filePath, ILoadOptions loadOptions, com.groupdocs.editor.EditorSettings settings)
Initializes new Editor instance with specified input document (as a full file path) with its load options and Editor settings
filePath
- Full path to the file. Should not be NULL. Should be
valid, and file should exist.loadOptions
- Delegate, that should return a document load options.
May be NULL and may return null - in that case document type will be
detected automatically and default load options for that type will be
applied.settings
- Delegate, that returns Editor settings, which allow to
set custom logger or caching. May be NULL - in that case Editor will use
own settings.public final void dispose()
Disposes this instance of Editor, so that it releases all internal resources and becomes unavailable for further usage
dispose
in interface com.aspose.ms.System.IDisposable
public final EditableDocument edit()
Opens a previously loaded document for editing using default options by generating and returning an instance of 'EditableDocument' class, that, in turn, contains methods for producing HTML markup and associated resources.
public final EditableDocument edit(IEditOptions editOptions)
Opens a previously loaded document for editing using specified format-specific options by generating and returning an instance of 'EditableDocument' class, that, in turn, contains methods for producing HTML markup and associated resources.
editOptions
- Format-specific document options, which allows to
tune-up conversion process. Should not be NULL. Should not conflict with
previously applied load options.
public final IDocumentInfo getDocumentInfo(String password)
Returns metadata about the document, that was loaded to this 'Editor' instance
password
- User can specify a password for a document, if this
document is encrypted with the password. May be NULL or empty string,
that is equivalent to the absent password.
public final boolean isDisposed()
Indicates whether this Editor instance was already disposed and cannot be used anymore (true) or not and is active (false)
isDisposed
in interface IAuxDisposable
public final void save(EditableDocument inputDocument, OutputStream outputDocument, ISaveOptions saveOptions)
Converts specified edited document, represented as instance of 'EditableDocument', to the resultant document of specified format and saves its content to specified stream
inputDocument
- Version of the input document, that was edited in
WYSIWYG HTML-editor and is stored as instance of 'EditableDocument'
class, which should be converted to output document of some specific
formatoutputDocument
- Output stream, in which the content of the
resultant document will be recorded. Should not be NULL, disposed, should
support writing.saveOptions
- Document saving options, which define the format of
the resultant document, and also general and format-specific saving
options.public final void save(EditableDocument inputDocument, String filePath, ISaveOptions saveOptions)
Converts specified edited document, represented as instance of 'EditableDocument', to the resultant document of specified format and saves its content to file by specified file path
inputDocument
- Version of the input document, that was edited in
WYSIWYG HTML-editor and is stored as instance of 'EditableDocument'
class, which should be converted to output document of some specific
formatfilePath
- Path to the file, in which the output document will be
saved. It file with the same name exists, it will be completely
rewritten.saveOptions
- Document saving options, which define the format of
the resultant document, and also general and format-specific saving
options.