Interface ImageDocument

  • All Implemented Interfaces:

    
    public interface ImageDocument
    
                        

    An image document. To create an instance use openDocument or openDocument or related static async methods.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract PdfDocument getDocument() Gets the converted Pdf document.
      abstract DocumentSource getImageDocumentSource() Returns the image document source which may be a DataProvider or a file Uri.
      abstract boolean saveIfModified() Saves the image document to its original location if it has been changed.
      abstract boolean saveIfModified(boolean metadata) Saves the image document to its original location if it has been changed.
      abstract boolean saveIfModified(@NonNull() DocumentSaveOptions documentSaveOptions, boolean metadata) Saves the image document to its original location if it has been changed.
      abstract Single<Boolean> saveIfModifiedAsync() Saves the image document to its original location if it has been changed.
      abstract Single<Boolean> saveIfModifiedAsync(boolean metadata) Saves the image document to its original location if it has been changed.
      abstract Single<Boolean> saveIfModifiedAsync(@NonNull() DocumentSaveOptions documentSaveOptions, boolean metadata) Saves the image document to its original location if it has been changed.
      abstract boolean isValidForEditing() Returns true if the document is editable (comes from a file URI or from another source that supports writing), false otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • saveIfModified

         abstract boolean saveIfModified()

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Returns:

        true if the file was modified and changes were saved. false if there was nothing to save.

      • saveIfModified

         abstract boolean saveIfModified(boolean metadata)

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Parameters:
        metadata - If true image document will be saved to its original location together with the generated Pdf document in the metadata, when false Pdf in the metadata will be purged if any, and the saving will take effect persistently.
        Returns:

        true if the file was modified and changes were saved. false if there was nothing to save.

      • saveIfModified

         abstract boolean saveIfModified(@NonNull() DocumentSaveOptions documentSaveOptions, boolean metadata)

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Parameters:
        documentSaveOptions - Save options for the document.
        metadata - If true image document will be saved to its original location together with the generated Pdf document in the metadata, when false Pdf in the metadata will be purged if any, and the saving will take effect persistently.
        Returns:

        true if the file was modified and changes were saved. false if there was nothing to save.

      • saveIfModifiedAsync

        @NonNull() abstract Single<Boolean> saveIfModifiedAsync()

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Returns:

        Single observable returning true if the file was modified and changes were saved. false if there was nothing to save.

      • saveIfModifiedAsync

        @NonNull() abstract Single<Boolean> saveIfModifiedAsync(boolean metadata)

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Parameters:
        metadata - If true image document will be saved to its original location together with the generated Pdf document in the metadata, when false Pdf in the metadata will be purged if any, and the saving will take effect persistently.
        Returns:

        Single observable returning true if the file was modified and changes were saved. false if there was nothing to save.

      • saveIfModifiedAsync

        @NonNull() abstract Single<Boolean> saveIfModifiedAsync(@NonNull() DocumentSaveOptions documentSaveOptions, boolean metadata)

        Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

        Parameters:
        documentSaveOptions - Save options for the document.
        metadata - If true image document will be saved to its original location together with the generated Pdf document in the metadata, when false Pdf in the metadata will be purged if any, and the saving will take effect persistently.
        Returns:

        Single observable returning true if the file was modified and changes were saved. false if there was nothing to save.

      • isValidForEditing

         abstract boolean isValidForEditing()

        Returns true if the document is editable (comes from a file URI or from another source that supports writing), false otherwise.

        Returns:

        true if the document supports editing, false otherwise.