Skip to main content
Participant
May 10, 2021
Question

PDF Embed API - Call Print and Save Function Programmatically

  • May 10, 2021
  • 1 reply
  • 1101 views

I want to use the Save and Print functions in the API externally to the iFrame. Is is there a function in

`AdobeDC.View` that would allow me to call these features programmatically?
    This topic has been closed for replies.

    1 reply

    Joel Geraci
    Community Expert
    Community Expert
    May 10, 2021

    Currently, the print sand save functions cannot be triggered programmatically.

    However, you can set up the save functionality to autosave at a given interval. Additionally, you can turn on "focus polling" so that a save occurs when the viewer loses focus.

     

    With focus polling, adding your own save button is unnecessary since simply by moving the focus to your button would cause the save to occur. What you might want to do instead is add your "Save" button but make it do something with the saved PDF rather than just update the content in the viewer.

    Participant
    March 31, 2022

    Hi Joel

     

    This doesn't work actually. Even with enableFocusPolling=true, it takes aroud 2 seconds after the annotation before SAVE_API is triggered.

     

    This means that our fake-Save button does not have the latest copy of the PDF file.

     

    1. Is there a way to trigger SAVE programmatically?
    2. Is there a way to programmatically check if any changes are unsaved?
    Participant
    April 1, 2022

    Hi Joel

    I have created this CodePen to illustrate this point: https://codepen.io/vmit/pen/JjMraxg