Class ImageDocumentLoader

    • Constructor Detail

      • ImageDocumentLoader

        ImageDocumentLoader()
    • Method Detail

      • openDocument

        @NonNull() static ImageDocument openDocument(@NonNull() Context context, @NonNull() 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.

      • openDocumentAsync

        @NonNull() static Single<ImageDocument> openDocumentAsync(@NonNull() Context context, @NonNull() 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.

      • getDefaultImageDocumentConfiguration

        @NonNull() 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).

      • getDefaultImageDocumentConfiguration

        @NonNull() static PdfConfiguration getDefaultImageDocumentConfiguration(@NonNull() PdfConfiguration configuration)

        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.

        Parameters:
        configuration - Given configuration which will be tailored with better options specific 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).

      • getDefaultImageDocumentActivityConfiguration

        @NonNull() static PdfActivityConfiguration getDefaultImageDocumentActivityConfiguration(@NonNull() 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 SINGLE and fit mode will be set to 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).