webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 419 forks source link

QUESTION: Copying manually selected content from a PDF file to a custom web application #64

Open sh000gar opened 10 years ago

sh000gar commented 10 years ago

Description of the Problem I would like to Solve:

Currently, I display a PDF file in my web browser on one monitor and a custom web application on a second monitor so that I can manually select text in the PDF file, copy the text (e.g. Ctrl C), click on a data field within the custom web application, and paste the text (e.g. Ctrl V) into the correct data field within the custom web application. I was just wondering if it is possible to streamline this process with a semi-automated solution as proposed below.

Proposed Possible Solution:

If Viewer.js and a custom web application are both residing on the same server, then is it possible to copy manually selected content from a PDF file displayed in Viewer.js to the custom web application using a custom developed user interface and workflow similar to what is described below:

  1. Manually select content in PDF file which is being displayed in Viewer.js;
  2. Right click on selected content;
  3. A custom developed web based menu appears and displays the names of the data fields available within the custom web application where this content could be saved to; AND
  4. Selecting the desired data field will automatically copy the manually selected content from the PDF file being displayed in Viewer.js to the corresponding data field in the custom web application.

If implementing the solution proposed above is possible, then I would greatly appreciate it if you can please explain how? Alternatively, if not, then I would greatly appreciate it if you can please explain why not.

Thank you.