IDocumentProcessorPlugin

public interface IDocumentProcessorPlugin

Defines an interface for external document processor plugin.

Methods

MethodDescription
append(InputStream inputStream, LoadOptions loadOptions)Append the document loading it with the specified load options.
load(InputStream inputStream, LoadOptions loadOptions)Load the document using the specified load options.
save(OutputStream outputStream, SaveOptions saveOptions)
setImageWatermark(InputStream imageWatermark, ImageWatermarkOptions imageWatermarkOptions)Adds image watermark on each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method.
setTextWatermark(String textWatermark, TextWatermarkOptions textWatermarkOptions)Adds text watermark on each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method.
toDocument()Parses the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method into Document object.
toPages(FixedPageSaveOptions saveOptions)Saves each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method using the specified fixed page save options.

append(InputStream inputStream, LoadOptions loadOptions)

public abstract void append(InputStream inputStream, LoadOptions loadOptions)

Append the document loading it with the specified load options.

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStreamThe input stream.
loadOptionsLoadOptionsThe document load options. Can be null , in this case the document is loaded with default load options.

load(InputStream inputStream, LoadOptions loadOptions)

public abstract void load(InputStream inputStream, LoadOptions loadOptions)

Load the document using the specified load options.

Parameters:

ParameterTypeDescription
inputStreamjava.io.InputStreamThe input stream.
loadOptionsLoadOptionsThe document load options. Can be null , in this case the document is loaded with default load options.

save(OutputStream outputStream, SaveOptions saveOptions)

public abstract void save(OutputStream outputStream, SaveOptions saveOptions)

Parameters:

ParameterTypeDescription
outputStreamjava.io.OutputStream
saveOptionsSaveOptions

setImageWatermark(InputStream imageWatermark, ImageWatermarkOptions imageWatermarkOptions)

public abstract void setImageWatermark(InputStream imageWatermark, ImageWatermarkOptions imageWatermarkOptions)

Adds image watermark on each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method.

Parameters:

ParameterTypeDescription
imageWatermarkjava.io.InputStreamImage used as a watermark.
imageWatermarkOptionsImageWatermarkOptionsImage watermark options.

setTextWatermark(String textWatermark, TextWatermarkOptions textWatermarkOptions)

public abstract void setTextWatermark(String textWatermark, TextWatermarkOptions textWatermarkOptions)

Adds text watermark on each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method.

Parameters:

ParameterTypeDescription
textWatermarkjava.lang.StringText used as a watermark.
textWatermarkOptionsTextWatermarkOptionsText watermark options.

toDocument()

public abstract Document toDocument()

Parses the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method into Document object.

Returns: Document

toPages(FixedPageSaveOptions saveOptions)

public abstract OutputStream[] toPages(FixedPageSaveOptions saveOptions)

Saves each page of the document loaded by load(java.io.InputStream, com.aspose.words.LoadOptions) method using the specified fixed page save options.

Parameters:

ParameterTypeDescription
saveOptionsFixedPageSaveOptions

Returns: java.io.OutputStream[]