Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

'Save as' button with javascript

Avatar

Former Community Member

I want to add a 'Save as' button in my pdf, for that I introduice this code :

app.alert("1");

this.saveAs("/c/temp/temp.pdf");

app.alert("2");

Only first message appear. Any help please

1 Reply

Avatar

Level 10

In Designer you have to use another version of JavaScript than in Acrobat.

replace

this.saveAs("/c/temp/temp.pdf");


with

event.target.saveAs("/c/temp/temp.pdf");