Skip to main content
Inspiring
Nov 1, 2023 6:27 PM UTC
Answered

Save Callback Not Being Executed

I have been using the Embed API and have been modifying code in lots of different ways.

Previously I remember when I would add an annotation, the save button would appear and a message at the top would say I have unsaved changes.

 

I finally got around to implementing the funcitonality for the SAVE_API callback, but now it seems the SDK is no longer identifying when a change has been made so the SAVE_API callback is never being fired. I have made some changes to my implementation like using a promise to load the PDF and added some custom logic on some annotation callback.  

Would anyone know why my SDK is no longer Identifying changes?

I'll be glad to provide more info if needed. 🙂

This topic is closed to new replies. Start a new post to keep the conversation going.
Tyler33163922ju49Correct answer
Inspiring
Nov 1, 2023 7:02 PM UTC

Ah, this should have cued me in in the documentation. My next step was to include PDF annotations. 

quoteWhen only enableAnnotationAPIs is true, adding or updating annotations does not alter the original PDF content. When both these variables are true, the APIs alter the original PDF.



3 replies

Tyler33163922ju49AuthorCorrect answer
Inspiring
Nov 1, 2023 7:02 PM UTC

Ah, this should have cued me in in the documentation. My next step was to include PDF annotations. 

quoteWhen only enableAnnotationAPIs is true, adding or updating annotations does not alter the original PDF content. When both these variables are true, the APIs alter the original PDF.



Translate
Joel Geraci
Community Expert
Community Expert
Nov 1, 2023 6:47 PM UTC

Were your changes just adding annotations or filling form fields? 

Translate
Inspiring
Nov 1, 2023 7:09 PM UTC

Thanks for jumping in quickly. I found that setting both enableAnnotationAPIs and includePDFAnnotations (which I was planning to use anyway) to true gave me the behaviour I was expecting. Now I can use the annotation APIs and the PDF is directly modified directly.
Also, your codepens on the Embed API have saved me a lot of time learning this API. You are awesome.

Translate