While in Acrobat, select Set Page Action& from the Document pull- down menu. In the Page Actions dialog, select When this happens& -> Page Open -> Add. For the type of action, select JavaScript. Click on Edit& to add your script. Copy and paste this script into the editor window:
// PDF JavaScript to make it a "TRIAL EDITION".
// Set the date you would like it to EXPIRE ON.
var d1 = util.scand("mm/dd/yy", "7/1/04");
// Let the script do the work...
var expire_on_X_days_left = 0;
var d2 = new Date();
var diff = (d2.valueOf() - d1.valueOf()) / 1000;
var daysleft = ((diff / 60) / 60) / 24;
if( daysleft > expire_on_X_days_left || daysleft == expire_on_X_days_left )
{
// Comment this line if you would like it to NOT MAKE A BEEP!
app.beep(1);
// Uncomment this if you would like a message to be displayed.
// app.alert("This document cannot be viewed anymore.");
this.closeDoc();
}
// :-) Script by Brian (thedude at bri1 com).
Main Topics
Browse All Topics





by: FunkmotorPosted on 2006-03-03 at 21:46:27ID: 16101906
You need some sort of real DRM solution that "phones home" to accomplish this, and there are a number of them out there; all with varying costs. None of them are particularly cheap, though.
pdf_securi ty.htm
There's these you might want to look at:
http://www.fileopen.com/ (Seems to be best behind Adobe themselves.)
http://www.locklizard.com/
Of course, Adobe has a solution for this called Policy Server. It is very expensive, however, and is intended for Governments and large corporations.
Hope that helps.