Javascript setAction WillSave DidSave

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

abutcher
User
Posts: 1
Joined: Tue Aug 02, 2011 7:04 am

Javascript setAction WillSave DidSave

Post by abutcher »

I am attempting to launch the viewer with the following args:

Code: Select all

"/runjs:newinst&showui=yes&log=yes" "my-script.js" "file.pdf"
where my-script.js attempts to hook the document's WillSave and DidSave events via setAction:

Code: Select all

this.setAction("DidSave", 'app.alert("Saved");');
However, on saving, the hook is not executed.

Is this functionality implemented or am I doing something wrong?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Re: Javascript setAction WillSave DidSave

Post by Stefan - PDF-XChange »

Hello abutcher,

I passed your question to the guys in our dev team, and will update this topic as soon as I get any news from them, or they might post directly here themselves. In any case we will keep you updated.

Best,
Stefan
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3603
Joined: Thu Jul 08, 2004 10:36 pm

Re: Javascript setAction WillSave DidSave

Post by Ivan - Tracker Software »

Thanks for the report. The issue is fixed, and the fix will be available in the next build of the viewer.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.