global with sharing class SimpleConvertController {
    @AuraEnabled
    global static Map<String,String> convert(String recordId){

        System.debug('recordId: ' + recordId);

        cadmus_core.ConvertController.ConvertDataModel cdm = new cadmus_core.ConvertController.ConvertDataModel();
        cdm.objectId = recordId; //this must be the Id of the record you want to generate from eg an Opportunity Id
        cdm.docConfigId = 'a055J000000huROQAY'; //the Id of the DocConfig you want to use in your generation, you can also choose to fill the cdm.packId parameter. Then then docConfigId is not required
        cadmus_core.DocGenerationWrapper wrapper = cadmus_core.ConvertController.convertWithWrapper(cdm);

        //Get the name of the generated file: wrapper.response.metadata.targetName
        //Get the generated file (Blob): wrapper.response.base64
        Map<String,String> result=new Map<String, String>();
        result.put('title',wrapper.response.metadata.targetName);
        result.put('base64',EncodingUtil.base64Encode(wrapper.response.base64));
        return result;
    }
}