# createPDFForDocument method

Future<ResultWrapper<CreatePDFResult>> createPDFForDocument(

1. PDFFromDocumentParams params

)

Creates a PDF for the given document. Please check the extra options that are part of the input params to modify the created PDF file per your needs.

## Implementation

    Future<ResultWrapper<CreatePDFResult>> createPDFForDocument(
        PDFFromDocumentParams params) async {
      try {
        var result = await SharedCalls.invoke(
            ScanbotSdk.channel, 'createPDFForDocument', params.toJson());

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