• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

PDF Embed API - Detect save button or programmatically save the pdf to the server

New Here ,
Mar 19, 2024 Mar 19, 2024

Copy link to clipboard

Copied

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

TOPICS
PDF Embed API

Views

82

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

I have a CodePen showing how to submit to a server via the Save button here.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

LATEST

Having the same issue here, did you find any solution?

 

I tried to check the existence of an enabled save button in the DOM as well, but since it is within an iframe I'm running into cross origin issues.

 

I think there needs to be at least one way to reliably check if a PDF is in an unsaved state.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources