downloadDocumentImage
Download the original document image for the document represented by documentId to the saveDir folder. Only the saveDir is provided. The actual filename will be determined by this method. This method will create saveDir if it doesn't already exist. This method will fail if saveDir exists but is not a directory.
This method implements simple caching. If an existing image file for this documentId already exists, and it can be parsed into a Bitmap image, it will be reused. If an existing file exists, and overwriteCache is enabled, the file will be overwritten.
Otherwise, the jpeg image version of the file will be downloaded and saved. The resulting File at which the image is located at will be returned.
Return
A DataProviderResponse containing the file at which the image is saved
Parameters
The id of the document for which to download the image
The directory in which to save the image
Whether or not an existing image should be overwritten