Object ImageDocumentLoader

    • Constructor Detail

    • Method Detail

      • openDocument

         final static ImageDocument openDocument(Context context, Uri documentUri)

        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 java.io.IOException.

        Note that this method blocks until the image document is loaded and should not be invoked on main thread.

        Parameters:
        context - Application context.
        documentUri - Uri pointing to the PDF document.
        Returns:

        ImageDocument instance if the opening succeeded.

      • openDocument

         final static ImageDocument openDocument(Context context, DocumentSource source)

        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 java.io.IOException.<br></br>

        Note that this method blocks until the image document is loaded and should not be invoked on main thread.

        Parameters:
        context - Application context.
        source - DocumentSource describing the source of the image document.
        Returns:

        ImageDocument instance if the opening succeeded.

      • openDocumentAsync

         final Single<ImageDocument> openDocumentAsync(Context context, Uri documentUri)

        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 java.io.IOException.

        Parameters:
        context - Application context.
        documentUri - Uri pointing to the PDF document.
        Returns:

        Single observable returning an ImageDocument instance if the opening succeeded.

      • getDefaultImageDocumentActivityConfiguration

         final static PdfActivityConfiguration getDefaultImageDocumentActivityConfiguration(PdfActivityConfiguration configuration)

        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 PageLayoutMode.SINGLE and fit mode will be set to PageFitMode.FIT_TO_SCREEN.

        Parameters:
        configuration - Given configuration which will be tailored with better options specific for image documents.
        Returns:

        Default activity configuration specifically thought for image documents (e.g. for a better user experience thumbnail bar and page number overlay are hidden).

      • getDefaultImageDocumentConfiguration

         final static PdfConfiguration getDefaultImageDocumentConfiguration()

        Returns default configuration for image documents.

        Returns:

        Default configuration specifically thought for image documents (e.g. for a better user experience layout mode is set to single and fit mode is set to the screen dimension).