'iFrame - Download with Changes

I wanted to make a custom button that, when clicked, downloads my PDF document with the information currently filled out in the document. Chrome recently added this ability to "Download with Changes", but I can't figure out how to call this function. The button has id='download-edited', but I am very new to JS so having a hard time trying to create a button that directly links to this when called.

I also need the file download to pre-specified directory, if possible!

Thank you all for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source