# createDocumentFromPDF method

Future<ResultWrapper<DocumentData>> createDocumentFromPDF(

1. Uri pdfUri

)

Create a new document from PDF file.

## Implementation

    Future<ResultWrapper<DocumentData>> createDocumentFromPDF(Uri pdfUri) async {
      try {
        var operationParamsMap = <String, dynamic>{
          "pdfUri": pdfUri,
        };

        var result = await SharedCalls.invoke(
            ScanbotSdk.channel, 'createDocumentFromPDF', operationParamsMap);

        return ResultWrapper.fromJson(jsonDecode(result),
            fromJsonT: DocumentData.fromJson);
      } catch (e) {
        Logger.root.severe(e);
        return ResultWrapper.error(e.toString());
      }
    }