DocumentDevice

Inheritance: java.lang.Object, com.aspose.pdf.devices.Device

public abstract class DocumentDevice extends Device

Abstract class for all devices which is used to process the whole pdf document.

Constructors

ConstructorDescription
DocumentDevice()

Methods

MethodDescription
processInternal(IDocument document, int fromPage, int toPage, System.IO.Stream output)Each device represents some operation on the document, e.g.
process(IDocument document, int fromPage, int toPage, OutputStream output)Each device represents some operation on the document, e.g.
processInternal(IDocument document, System.IO.Stream output)Processes the whole document and saves results into stream.
process(IDocument document, OutputStream output)Processes the whole document and saves results into stream.
process(IDocument document, String outputFileName)Processes the whole document and saves results into file.
process(IDocument document, int fromPage, int toPage, String outputFileName)Processes certain pages of the document and saves results into file.
binarizeBradley(InputStream inputImageStream, OutputStream outputImageStream, double threshold)Do Bradley binarization for input stream.

DocumentDevice()

public DocumentDevice()

processInternal(IDocument document, int fromPage, int toPage, System.IO.Stream output)

public abstract void processInternal(IDocument document, int fromPage, int toPage, System.IO.Stream output)

Each device represents some operation on the document, e.g. we can convert pdf document into another format.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
fromPageintDefines the page from which to start processing.
toPageintDefines the last page to process.
outputcom.aspose.ms.System.IO.StreamDefines stream where the results of processing are stored.

process(IDocument document, int fromPage, int toPage, OutputStream output)

public void process(IDocument document, int fromPage, int toPage, OutputStream output)

Each device represents some operation on the document, e.g. we can convert pdf document into another format.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
fromPageintDefines the page from which to start processing.
toPageintDefines the last page to process.
outputjava.io.OutputStreamDefines stream where the results of processing are stored.

processInternal(IDocument document, System.IO.Stream output)

public void processInternal(IDocument document, System.IO.Stream output)

Processes the whole document and saves results into stream.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
outputcom.aspose.ms.System.IO.StreamDefines stream where the results of processing are stored.

process(IDocument document, OutputStream output)

public void process(IDocument document, OutputStream output)

Processes the whole document and saves results into stream.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
outputjava.io.OutputStreamDefines stream where the results of processing are stored.

process(IDocument document, String outputFileName)

public void process(IDocument document, String outputFileName)

Processes the whole document and saves results into file.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
outputFileNamejava.lang.StringDefines file where the results of processing are stored.

process(IDocument document, int fromPage, int toPage, String outputFileName)

public void process(IDocument document, int fromPage, int toPage, String outputFileName)

Processes certain pages of the document and saves results into file.

Parameters:

ParameterTypeDescription
documentIDocumentThe document to process.
fromPageintThe first page to start processing.
toPageintThe last page of processing.
outputFileNamejava.lang.StringDefines file where the results of processing are stored.

binarizeBradley(InputStream inputImageStream, OutputStream outputImageStream, double threshold)

public void binarizeBradley(InputStream inputImageStream, OutputStream outputImageStream, double threshold)

Do Bradley binarization for input stream.

Parameters:

ParameterTypeDescription
inputImageStreamjava.io.InputStreamThe input image stream.
outputImageStreamjava.io.OutputStreamThe output image stream.
thresholddoubleThe threshold value between 0.0 and 1.0.