So, here's what I need to do
- When a user opens a PDF document, I need to have my add-on check if there is a side-car file in the same location as the document (this indicates it comes from a document management system we are integrating with). If the side-car file is not there, my plugin will do nothing.
- I need to read the side-car file (XML or JSON) and determine various properties (meta data about the PDF document from the document system).
- The user changes the document and wants to save it back (the document is either a form with data he can fill in, or open in DC and is changed). I want to intercept the save command, ask the user if he wants to save it back to the document management system, if he clicks OK, have the document saved, and then (using my own code) ship the document back to my document management system.
- Close the document.
Is this possible to do in a Javascript add-on? I'd rather not do it in C++.