fromUri

open fun fromUri(@NonNull context: Context, @NonNull officeDocumentUri: Uri, @NonNull serverUri: Uri, @NonNull jwt: String): OfficeToPdfConverter

Creates an OfficeToPdfConverter from a Uri. Supported URIs are:

  • URIs with scheme "file://" pointing to a file in the filesystem.
  • URIs with scheme "file:///android_asset/" pointing to the application assets, in this case a temporary file is used.
  • URIs with scheme "content://", in this case the data returned by the content provider will first be copied to a temporary file before being uploaded to the server. In case this is undesirable use a "file://" URI to ensure no temporary files are created.

Parameters

context

The context to use.

officeDocumentUri

URI pointing to the office file to convert.

serverUri

The URI of the server that will perform the conversion.

jwt

A JWT containing the SHA-256 of the office file that will be converted. Used to authenticate access to the server.