Copy and paste/ read and write from an uploaded document

1
Hello,   I am trying to build an application that has 1 very specific function...the function is to upload a powerpoint, google slides, or pdf into the application. While viewing the presentation be able to copy highlighted text from the presentation and paste them to a text box by clicking 1 button. I am looking for something in the picture below. Let me know if this is possible with Mendix. Thank you very much for your time.   Very Respectfully, Josh Reissig  
asked
1 answers
0

If I’m understanding it correctly the user does a manual select text, and you want a button to copy the selection to a input field (text editor) in the Mendix app?

The problem is that if you view a file in the browser (whether that file is presented by Mendix or not) the file actually is a “local” instance on the users' pc (in the browser). Which means you can’t easily let the server (Mendix) app know what text (locally) has been highlighted and send that to the Mendix app.

I don't think this is even possible (with or without Mendix) from a security perspective, I don't think it will allow you to access local file contents from the browser in such a way that you would be able to read what’s been selected. An exception might be found in the PDF.JS api, which is an option with the Document Viewer https://appstore.home.mendix.com/link/app/12/Mendix/Document-Viewer. Which allows you more control over the display of a PDF files. But that would still mean, writing Javascript and figuring out if this is part of the pdf.js api.

Edit: what would be possible is to extract the text strings from a document, and store that in Mendix, and create copy paste functionality around that

 

answered