PDF Transformation and RMP_FileUpload

562 views
Skip to first unread message

andre.fc....@gmail.com

unread,
Jul 7, 2015, 12:44:44 PM7/7/15
to suppor...@runmyprocess.com
Hi all,

Does anyone know if it's possible to list in a RMP_FileUpload widget the result of a PDF Transformation?

Thanks in advance!

Murali

unread,
Jul 8, 2015, 10:31:59 AM7/8/15
to suppor...@runmyprocess.com, andre.fc....@gmail.com, andre.fc....@gmail.com
Hi Andre,

RMP_FileUpload can be used only to upload files by an user and can't be set as part result of Process which generates the PDF file.

Altenately, you can create a CAPI to capture the PDF file url, name as output variable of a CAPI, refer attached.

result :
<#assign pattern={}>
<#assign pattern =P_json_put(pattern,"pdf_file_name",pdf_file_name)>
<#assign pattern =P_json_put(pattern,"pdf_file_url",pdf_file_url)>
${pattern}

And display the file reference in web interface in HTML Widget, using below code sample by including the CAPI and calling it from JS.

function ok(P_computed){
        //alert("enter into code");
        //alert(P_computed.result.pdf_file_url);
        //alert(P_computed.result.pdf_file_name);
    var uploaded_files_info_html = "<table border='1' cellpadding='5'><tr><th>Share point URL</th></tr>";
    uploaded_files_info_html = uploaded_files_info_html + "<tr><td><a href='"+P_computed.result.pdf_file_url+"'>"+P_computed.result.pdf_file_name+"</a></td></tr>"
 uploaded_files_info_html = uploaded_files_info_html + "</table>";
 id_uploaded_files_info.setHtml(uploaded_files_info_html);
}

function ko(P_error){
    alert(JSON.stringify(P_error));
    //id_spinner.setVisible(false);
}

var input = {};
var options = {};

id_generate_pdf_and_attach_to_project.trigger(input,options,ok,ko);

Hope this helps and let us know for any additional help.

Regards,
Murali

CAPI - generate PDF.png
Reply all
Reply to author
Forward
0 new messages