java.lang.Object | |
↳ | com.pspdfkit.document.ImageDocumentLoader |
Helper class for loading ImageDocument
from a DocumentSource
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ImageDocumentLoader() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static PdfActivityConfiguration |
getDefaultImageDocumentActivityConfiguration(PdfActivityConfiguration configuration)
Returns default activity configuration for image documents from a given initial
configuration.
| ||||||||||
static PdfActivityConfiguration |
getDefaultImageDocumentActivityConfiguration(Context context)
Returns default activity configuration for image documents.
| ||||||||||
static PdfConfiguration |
getDefaultImageDocumentConfiguration(PdfConfiguration configuration)
Returns default configuration for image documents from a given initial configuration.
| ||||||||||
static PdfConfiguration |
getDefaultImageDocumentConfiguration()
Returns default configuration for image documents.
| ||||||||||
static ImageDocument |
openDocument(Context context, Uri documentUri)
Opens an image document from a Uri.
| ||||||||||
static ImageDocument |
openDocument(Context context, DocumentSource source)
Opens an image document from a Uri.
| ||||||||||
static Single<ImageDocument> |
openDocumentAsync(Context context, DocumentSource source)
Opens an image document from a Uri.
| ||||||||||
static Single<ImageDocument> |
openDocumentAsync(Context context, Uri documentUri)
Opens an image document from a Uri.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns default activity configuration for image documents from a given initial
configuration. For a better user experience, thumbnail bar and page number overlay will be
hidden, layout mode will be set to SINGLE
and fit mode will be set to
FIT_TO_SCREEN
.
configuration | Given configuration which will be tailored with better options specific for image documents. |
---|
Returns default activity configuration for image documents.
Returns default configuration for image documents from a given initial configuration. For a
better user experience, layout mode will be set to SINGLE
and fit mode
will be set to FIT_TO_SCREEN
.
configuration | Given configuration which will be tailored with better options specific for image documents. |
---|
Returns default configuration for image documents.
Opens an image document from a Uri. Note that currently only local files are supported and
passing remote or non-file Uris will throw an IOException
.
Note that this method blocks until the image document is loaded and should not be invoked on main thread.
context | Application context. |
---|---|
documentUri | Uri pointing to the PDF document. |
ImageDocument
instance if the opening succeeded.IOException | If file was not opened correctly. |
---|---|
PSPDFKitNotInitializedException | If PSPDFKit was not initialized with initialize(Context, String) call.
|
Opens an image document from a Uri. Note that currently only local files are supported and
passing remote or non-file Uris will throw an IOException
.
Note that this method blocks until the image document is loaded and should not be invoked on main thread.
context | Application context. |
---|---|
source | DocumentSource describing the source of the image document. |
ImageDocument
instance if the opening succeeded.IOException | If file was not opened correctly. |
---|---|
PSPDFKitNotInitializedException | If PSPDFKit was not initialized with initialize(Context, String) call.
|
Opens an image document from a Uri. Note that currently only local files are supported and
passing remote or non-file Uris will throw an IOException
.
context | Application context. |
---|---|
source | DocumentSource describing the source of the image document. |
ImageDocument
instance if the opening
succeeded.PSPDFKitNotInitializedException | If PSPDFKit was not initialized with initialize(Context, String) call.
|
---|
Opens an image document from a Uri. Note that currently only local files are supported and
passing remote or non-file Uris will throw an IOException
.
context | Application context. |
---|---|
documentUri | Uri pointing to the PDF document. |
ImageDocument
instance if the opening
succeeded.PSPDFKitNotInitializedException | If PSPDFKit was not initialized with initialize(Context, String) call.
|
---|