public class DocumentOcrResultSet extends Object
Modifier and Type | Method and Description |
---|---|
Iterator<com.google.cloud.vision.v1.TextAnnotation> |
getAllPages()
Returns an
Iterator over all the OCR pages of the document. |
int |
getMaxPage()
Returns the maximum page number in the result set.
|
int |
getMinPage()
Returns the minimum page number in the result set.
|
com.google.cloud.vision.v1.TextAnnotation |
getPage(int pageNumber)
Retrieves the parsed OCR information of the page at index
pageNumber of the document. |
public int getMinPage()
public int getMaxPage()
public com.google.cloud.vision.v1.TextAnnotation getPage(int pageNumber) throws com.google.protobuf.InvalidProtocolBufferException
pageNumber
of the document.
The page number must be a value between getMinPage()
and getMaxPage()
.
This returns a TextAnnotation object which is Google Cloud Vision's representation of a page of a document. For more information on reading this object, see: https://cloud.google.com/vision/docs/reference/rpc/google.cloud.vision.v1#google.cloud.vision.v1.TextAnnotation
pageNumber
- the page number of the documentTextAnnotation
representing the page of the documentcom.google.protobuf.InvalidProtocolBufferException
- if the OCR information for the page failed to be parsedCopyright © 2023. All rights reserved.