PDF Embed API - Detect save button or programmatically save the pdf to the server
- March 19, 2024
- 3 replies
- 1127 views
Hi
I am currently facing an issue where we have built a view that uses the PDF Embed API.
Next to the view, we have located some user fields like "filename, date, notes, ..."
Bellow these fields is a "save" button, to save the data.
The issue:
- I can't seem to find a way to detect if the PDF has unsaved changes. Because now when the user clicks our "save" button, he loses his PDF changes.
What have we tried:
- Annotation listener. This works for "marking", "drawing", ... but NOT for "text fields", "radio buttons", ...
I understand why, as these are not "annotations.
- I have tried to always show the save button but without changes, it is greyed out, so I still can't force the user to first update his document.
What I would like (if order of preference):
Option 1: To be able to trigger the save programmatically. This way, our button can work as the main save button.
Option 2: have an event listener that exposes when the adobe save button is showed and enabled. This way, I can disable my button and show text that they first need to click the other button. not so user friendly but it would work.
Option 3: have an event listener on field, radiobutton, checkbox, ... changes. this I can then add to our current annotation listeners to have a "workaround".
Option 4: maybe someone has a much better idea but visually we want to have the PDF next to the fields as they are in a "bootstrap modal".
Hoping for a solution.
Greetings
Brent
