# GmsDocumentScanningResult

public abstract class **GmsDocumentScanningResult** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) Result for document scanning.

### Nested Class Summary

|---|---|---|---|
| class | [GmsDocumentScanningResult.Page](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Page) || Represents a page in the scanning result. |
| class | [GmsDocumentScanningResult.Pdf](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Pdf) || Represents the PDF in the scanning result. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Public Constructor Summary

|---|---|
|   | [GmsDocumentScanningResult](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult#GmsDocumentScanningResult())() |

### Public Method Summary

|---|---|
| static [GmsDocumentScanningResult](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult) | [fromActivityResultIntent](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult#fromActivityResultIntent(android.content.Intent))([Intent](https://developer.android.com/reference/android/content/Intent.html) data) Gets the `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult` from the scanning Activity result data. |
| abstract [List](https://developer.android.com/reference/java/util/List.html)\<[GmsDocumentScanningResult.Page](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Page)\> | [getPages](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult#getPages())() Returns the scanned pages or `null` if `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScannerOptions#RESULT_FORMAT_JPEG` was not specified when creating the scanner options. |
| abstract [GmsDocumentScanningResult.Pdf](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Pdf) | [getPdf](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult#getPdf())() Returns the PDF result or `null` if `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScannerOptions#RESULT_FORMAT_PDF` was not specified when creating the scanner options. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Public Constructors

#### public **GmsDocumentScanningResult** ()

## Public Methods

#### public static [GmsDocumentScanningResult](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult) **fromActivityResultIntent** ([Intent](https://developer.android.com/reference/android/content/Intent.html) data)

Gets the `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult` from the scanning Activity result data.

Returns `null` if fails to extract or construct the result.

#### public abstract [List](https://developer.android.com/reference/java/util/List.html)\<[GmsDocumentScanningResult.Page](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Page)\>
**getPages** ()

Returns the scanned pages or `null` if `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScannerOptions#RESULT_FORMAT_JPEG` was not specified when creating
the scanner options.

#### public abstract [GmsDocumentScanningResult.Pdf](https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScanningResult.Pdf) **getPdf** ()

Returns the PDF result or `null` if `https://developers.google.com/android/reference/com/google/mlkit/vision/documentscanner/GmsDocumentScannerOptions#RESULT_FORMAT_PDF` was not specified when creating
the scanner options.