Package 

Object Document

    • Method Detail

      • writePDF

        @JvmOverloads() final static File writePDF(File file, Boolean overwrite, Document.PDFPageFormat pageFormat, Integer maxSizeKB)

        This method generates a PDF document from the loaded or scanned pages.

        Parameters:
        file - the File where to save the PDF document.
        overwrite - if file already exist, indicate whether to override it or to append number, e.g.
        pageFormat - the PDF page format, refer to PDFPageFormat.
        maxSizeKB - the maximum file size in KB of the PDF or 0 if no compression should be applied.
      • writePDF

        @JvmOverloads() final static File writePDF(File file, Boolean overwrite, Document.PDFPageFormat pageFormat)

        This method generates a PDF document from the loaded or scanned pages.

        Parameters:
        file - the File where to save the PDF document.
        overwrite - if file already exist, indicate whether to override it or to append number, e.g.
        pageFormat - the PDF page format, refer to PDFPageFormat.
      • writePDF

        @JvmOverloads() final static File writePDF(File file, Boolean overwrite)

        This method generates a PDF document from the loaded or scanned pages.

        Parameters:
        file - the File where to save the PDF document.
        overwrite - if file already exist, indicate whether to override it or to append number, e.g.
      • writePDF

        @JvmOverloads() final static File writePDF(File file)

        This method generates a PDF document from the loaded or scanned pages.

        Parameters:
        file - the File where to save the PDF document.
      • writeImage

         final static File writeImage(Integer page, File file)

        This method generates a JPG from the loaded or scanned page and saves it to a local file.

        Parameters:
        page - the page to be generated as JPG
        file - the file where to save the JPG file
      • getImage

        @JvmOverloads() final static Bitmap getImage(Integer page)

        This method generates a JPG from the loaded or scanned page and returns it as a Bitmap.

        Parameters:
        page - the page to be generated as JPG
      • getImageBytes

        @JvmOverloads() final static ByteArray getImageBytes(Integer page)

        This method generates a JPG from the loaded or scanned page and returns it as a ByteArray.

        Parameters:
        page - the page to be generated as JPG
      • loadFile

        @JvmOverloads() final static Boolean loadFile(String path, String password)

        This method loads a file from the given path.

        Only paths in internal app directory and it's subdirectories are supported.

        Parameters:
        path - the path pointing to the file to be loaded.
        password - the password if file is encrypted.
      • loadFile

        @JvmOverloads() final static Boolean loadFile(String path)

        This method loads a file from the given path.

        Only paths in internal app directory and it's subdirectories are supported.

        Parameters:
        path - the path pointing to the file to be loaded.
      • loadFile

        @JvmOverloads() final static Boolean loadFile(ByteArray bytes, String fileExtension, String password)

        This method loads a file from the given ByteArray.

        Parameters:
        bytes - the ByteArray of the file to be loaded.
        fileExtension - the extension of the file to be loaded, e.g.
        password - the password if file is encrypted.
      • loadFile

        @JvmOverloads() final static Boolean loadFile(ByteArray bytes, String fileExtension)

        This method loads a file from the given ByteArray.

        Parameters:
        bytes - the ByteArray of the file to be loaded.
        fileExtension - the extension of the file to be loaded, e.g.
      • loadFile

        @JvmOverloads() final static Boolean loadFile(Uri uri, String password)

        This method loads a file from the given Uri.

        Parameters:
        uri - the content Uri pointing to the file to be loaded.
        password - the password if file is encrypted.
      • loadFile

        @JvmOverloads() final static Boolean loadFile(Uri uri)

        This method loads a file from the given Uri.

        Parameters:
        uri - the content Uri pointing to the file to be loaded.
      • addPageFile

         final static Boolean addPageFile(String path)

        This method adds a page from the given path to the currently loaded document.

        Only paths in internal app directory and it's subdirectories are supported.

        Parameters:
        path - the path pointing to the file to be loaded.
      • addPage

         final static Boolean addPage(ByteArray bytes, String fileExtension)

        This method adds a page from the given ByteArray to the currently loaded document.

        Parameters:
        bytes - the ByteArray of the file to be loaded.
        fileExtension - the extension of the file to be loaded, e.g.
      • pageCount

         final static Integer pageCount()

        This method returns the page count of the currently loaded document.