public abstract class DocumentContent extends Object implements AutoCloseable
Provides an interface to work with document's content.
Modifier | Constructor and Description |
---|---|
protected |
DocumentContent()
Initializes a new instance of the
DocumentContent class. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the unmanaged resources used by the container.
|
void |
dispose()
Releases the unmanaged resources used by the extractor.
|
protected void |
dispose(boolean isDisposing)
Releases the unmanaged resources used by the extractor.
|
List<ImageArea> |
getImageAreas(int pageIndex)
Extracts image areas from the document page.
|
abstract List<ImageArea> |
getImageAreas(int pageIndex,
ImageAreaSearchOptions searchOptions)
Extracts image areas from the document page.
|
abstract DocumentPage |
getPage(int pageIndex)
Extracts a text areas from the document page.
|
int |
getPageCount()
Gets a page count.
|
Size |
getPageSize(int pageIndex)
Gets a size of the page.
|
List<TextArea> |
getTextAreas(int pageIndex)
Extracts text areas from the document page.
|
abstract List<TextArea> |
getTextAreas(int pageIndex,
TextAreaSearchOptions searchOptions)
Extracts text areas from the document page.
|
protected void |
setPageCount(int value)
Sets a page count.
|
protected DocumentContent()
Initializes a new instance of the DocumentContent
class.
public int getPageCount()
Gets a page count.
protected void setPageCount(int value)
Sets a page count.
value
- An integer value that represents a page count of the document.public void dispose()
Releases the unmanaged resources used by the extractor.
public void close()
Releases the unmanaged resources used by the container.
close
in interface AutoCloseable
public abstract DocumentPage getPage(int pageIndex)
Extracts a text areas from the document page.
pageIndex
- A zero-based index of the page.DocumentPage
class.public Size getPageSize(int pageIndex)
Gets a size of the page.
pageIndex
- A zero-based index of the page.Size
class.public List<TextArea> getTextAreas(int pageIndex)
Extracts text areas from the document page.
pageIndex
- A zero-based index of the page.TextArea
objects.public List<ImageArea> getImageAreas(int pageIndex)
Extracts image areas from the document page.
pageIndex
- A zero-based index of the page.ImageArea
objects.public abstract List<TextArea> getTextAreas(int pageIndex, TextAreaSearchOptions searchOptions)
Extracts text areas from the document page.
pageIndex
- A zero-based index of the page.searchOptions
- A search options for extracting text areas.TextArea
objects.public abstract List<ImageArea> getImageAreas(int pageIndex, ImageAreaSearchOptions searchOptions)
Extracts image areas from the document page.
pageIndex
- A zero-based index of the page.searchOptions
- A search options for extracting image areas.ImageArea
objects.protected void dispose(boolean isDisposing)
Releases the unmanaged resources used by the extractor.
isDisposing
- A boolean true if invoked from Dispose; otherwise, false.Copyright © 2019. All rights reserved.