Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to add an expiration date on my PDF files

7,152 views
Skip to first unread message

Tobias Hugener

unread,
Jan 30, 2003, 5:49:40 AM1/30/03
to
See this thread:
Marty Schmidt "Time limit possible on PDF documents?" 1/18/03 8:50am </cgi-bin/webx?50@@.1de76cfd>

martial pagniez

unread,
Jan 30, 2003, 5:47:05 AM1/30/03
to
I have Acrobat 5.05.

How is it possible to add an expiration date on a pDF file? like ebook

what kind of tools or Plug-in do I have to use or buy?

Unknown

unread,
Jan 30, 2003, 6:19:45 AM1/30/03
to
Just before proceeding, you should bear in mind that none
of the following is full proof. Someone with a more profound
knowledge of Acrobat than the average could possibly
workaround this.
There are two ways I use, the brutal way and the kind way..
The former just closes the document as soon as it is opened,
once the expiry date is reached and thereafter. Note - it will not
work from within a browser!
The latter gives the reader some advance notice/s starting
one to three days prior to expiry, and closes the document as
soon as it is opened at the expiry date and thereafter.
An alternative on both is to blank the document instead
of closing it.
I'll explain here the brutal way because it's simpler:

1. Open the document in Acrobat

2. Save it as <original_name>_x (x stands for "expirable")
>>>> THIS is highly important, becuase after you render the
>>>> document expirable, even you won't be able to re-open
>>>> it once the expiry date is due and thereafter!!

3. In the menu bar, click: Tools-->JavaScript-->Document JavaScripts...
a. In the 'Script Name:' box, write: Expiry
b. Click 'Add...'
c. Delete the editor's window contents 'function....'
d. Write the following code:

////Start of Code
// Get the Expiry Date
var ED = util.scand("dd/mm/yyyy","15/11/2005"); // Expiration date is Nov. 15th, 2005. Change this date to suit your need

// Get Today's Date
var TD = new Date();

// Validate and take measures!
var diff = (((((ED.valueOf() - TD.valueOf()) / 1000) / 60) / 60) / 24); // Days difference
if (diff < 1) {
// Now the drastic thing...
DontSave = true
this.closeDoc(DontSave)
};
////End of Code

4. In the menu bar, click: File-->Document Security...
a. Select 'Acrobat Standard Security'
b. Check 'Password Required to Change...'
c. Write a password in the 'Master Password' cell
d. Check all the 'Permissions' boxes
e. Click 'OK'
f. Re-enter your password as requested

5. In the menu bar, click: File-->Save As...
Make sure (!) that the filename is (still) <original_name>_x, then click 'Save'

You now keep <original_name> to yourself and deliver only <original_name>_x copies.

Regards, Doron

Guy Smiley

unread,
Jan 30, 2003, 11:00:24 AM1/30/03
to
To defeat this, all the user has to do is turn off Javascript in Acrobat, right?
--Mike Nitabach

Unknown

unread,
Jan 30, 2003, 7:28:56 PM1/30/03
to
True! But still, this is by default on and the user has to know that it's an alterable preference.

Guy Smiley

unread,
Jan 30, 2003, 9:06:53 PM1/30/03
to
In other words, the only security it provides is in relation to people who are either too indifferent or too stupid to figure this out.

-Mike Nitabach

Robert Lockett

unread,
Jan 31, 2003, 12:37:46 PM1/31/03
to

In other words, the only security it provides is in relation to people
who are either too indifferent or too stupid to figure this out.


Isn't that true of all security schemes?

Unknown

unread,
Jan 31, 2003, 12:52:32 PM1/31/03
to
I cannot agree more to you both. Adobe does not allow (and I hope will never do) anything to be irreversible. The way to do that (workaround security) will depend on the ability, knowledge, dignity and intent of the user. Also, in this case, if he/she is using AcroRead (most probably) or full Acrobat (less likely)

Guy Smiley

unread,
Jan 31, 2003, 2:12:48 PM1/31/03
to
Robert:

Of course, but you have to be *really* indifferent or *really* stupid to be thwarted by this scheme. In my opinion, this sort of scheme is so easy to thwart, that it does more harm than good to suggest it someone who is looking for even a de minimus level of security.

In contrast, you need both a very strong desire and a significant amount of intelligence and willingness to break the law to overcome a legitimate digital rights management system. For this reason, these are the solutions that it makes sense to suggest.

--Mike Nitabach

JC S

unread,
Feb 25, 2003, 1:18:20 AM2/25/03
to
Thank you Doron, the script is helpful.

To enhance it, I added a textbox field called "blank1" to each page of the PDF file. This field is solid white background to block out the main content of the file. By default, it's set visible.

If the file is determined by the script to be not expired, then the field is hidden, enabling the user to view the document. If JavaScript is disabled, the user gets a blank page. The field can be set to say something like "JavaScript must be enabled to view this document".

rooy...@gmail.com

unread,
Jan 5, 2016, 8:31:07 AM1/5/16
to
can you send me your code? i want also if Javascript is disabled, the user gets a blank page.

thanks !
roy

ktunoti...@gmail.com

unread,
Dec 24, 2017, 3:19:12 AM12/24/17
to
But will that work in online browsers ?? It will just show black pages in google drive preview ? Right ?
0 new messages