Hi,
I have a requirement to read uploaded DOCX file from appian uploads folder convert it to PDF and show in document viewer on richtext icon click. I have been able to convert DOCX file to PDF but not able to show it in document viewer.
Please help.
Discussion posts and replies are publicly visible
Hi shamima0001,
Could you please share the error that you're facing?
I am not facing any error, I just don't know how to achieve it.
I hope this documentation helps you. Just pass your documentId for the document parameter.docs.appian.com/.../Document_Viewer_Component.html
I know how to show PDF file in document viewer. My requirement is to get DOCX file convert it and show it document viewer on the fly, Below is the Interface & Process Model
Interface
a!localVariables( local!file, { a!fileUploadField( label: "File Upload", labelPosition: "ABOVE", target: cons!TCT_UPLOAD_FILES_FOLD, value: local!file, saveInto:local!file, required: true, validations: {} ), a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Upload", icon: "upload", saveInto: { a!save(ri!file,local!file) }, submit: true, style: "PRIMARY" ) }, align: "START" ), a!documentViewerField( label: "Document Viewer", labelPosition: "ABOVE", document: ri!pdfFile, height: "MEDIUM" ) } )
Process Model
Oh okay, got confused with your reply.
You can have another User Input task after the PDF conversion node and show the document inside that form. Since the path is activity chained, after clicking on upload, the process will convert the document and show it in the next interface where the user lands.
I have implemented what you mentioned above, now instead of viewing PDF file in document viewer its downloading DOCX file when I am running PM.
UserInput
You need to save the (new) Doc ID of the converted PDF into a PV, and pass that value into your user input task's interface. I'm not sure what you're intending to do in the screenshot above, but what we can see is not enough.
shamima0001, As mike said, you need to pass the converted PDF file into the form. Also, the data type of the rule input should be a 'document' type.