You are sharing a confidential proposal with a potential partner. You want them to be able to review it for a limited time. After two weeks, or after they have opened it three times, you want the document to become inaccessible. They have had enough time to read it. The information should no longer be available. You need the PDF to self-destruct.
Setting a PDF to expire after a certain time or number of views is possible through a combination of PDF Security settings, including password expiration, digital rights management, and JavaScript-based access controls. The effectiveness of these methods varies, and none are foolproof, but they provide meaningful protection for time-sensitive documents.

The Three Levels of PDF Expiration Control
Password expiration through a server-based DRM system is the first, most secure method a server-based digital rights management system. The PDF is encrypted and can only be opened by a viewer that checks with an online server. The server grants or denies access based on rules you set: time window, number of opens, IP address range. This is the most secure method because access is controlled by a server you control, not by the PDF file itself. The downside is that it requires specialized DRM software and the recipient must have an internet connection to open the file.
Password-protected PDFs with server-controlled key distribution provide the second method with the password shared through a service that controls access. You encrypt the PDF with a strong password. You do not send the password to the recipient. Instead, you upload the password to a secure sharing service that provides it to the recipient only after they verify their identity and only for a limited time window. After the window closes, the service stops providing the password. The PDF itself is unchanged, but without the password, it is unreadable. This method separates the file distribution from the key distribution.
JavaScript-based restrictions are the third method embedded in the PDF. A script in the PDF can check the current date and disable viewing if the expiration date has passed. It can count the number of times the document has been opened and disable access after a threshold. The limitation is that JavaScript-based restrictions only work in PDF viewers that execute JavaScript, primarily Adobe Acrobat. A viewer that ignores JavaScript will ignore the expiration. This method is a speed bump, not a wall. It deters casual recipients. It does not stop a determined recipient who knows how to disable JavaScript.
Try Protect PDF
No installation needed. Works directly in your browser.
Implementing JavaScript-Based Expiration
WukongPDF can embed an expiration script in a PDF. Open the document properties and navigate to the JavaScript section. Add a script that runs when the document opens. The script checks the current date against an expiration date you specify. If the current date is past the expiration, the script displays a message and closes the document. A simple date-check script is the most common form of PDF self-destruction.
The PDF Encryption can also be combined with JavaScript. Encrypt the PDF with a password. Embed JavaScript that checks the date. The recipient enters the password to decrypt the file. The script then checks the date. If the date has passed, the script closes the file. The recipient has the password and can decrypt the content, but the script prevents them from viewing it after expiration. This two-layer approach provides stronger protection than either method alone.
The Limitations You Must Understand
None of these methods prevent the recipient from taking a screenshot, printing the document, or copying the content while they have access. If the recipient can view the document, they can capture its content. PDF expiration controls access to the file, not to the information. Once the information has been viewed, it exists in the recipient's memory and possibly in their screenshots folder. Expiration is a tool for managing access windows, not for preventing information leakage.
When dealing with truly sensitive information that must not persist beyond a limited time, consider whether a PDF is the right format at all. A secure online document viewer that streams the content without allowing download or local storage provides stronger protection than any PDF-based method. The Protect PDF through expiration and encryption is appropriate for moderate-sensitivity documents where the convenience of the PDF format outweighs the risk of content capture.
A Practical Alternative to PDF Expiration
For many use cases, a simpler approach achieves the same goal. Share the document through a cloud storage link with an expiration date. Google Drive, Dropbox, and OneDrive all support link expiration. The recipient clicks the link to view or download the file. After the expiration date, the link stops working. The PDF itself is unchanged, but the recipient can no longer access it through that link. Combine this with password protection for two-layer access control: the password decrypts the file, and the expiring link controls when the file can be downloaded.
For highly sensitive documents that genuinely need to become inaccessible, consider whether a PDF is the right format at all. Secure virtual data rooms, used in mergers and acquisitions, provide granular access controls, view-only modes that prevent downloads, activity logging that shows who viewed what and when, and the ability to revoke access instantly. These platforms are purpose-built for controlled document sharing and provide protections that no standalone PDF can match. The PDF expiration techniques described here are appropriate for moderate-sensitivity documents. For documents where a leak would cause significant harm, invest in a platform designed for secure document sharing.
A practical middle ground: watermark the PDF with the recipient's name and the access window. A watermark that reads "For John Smith - Access expires July 30, 2026" serves as both a deterrent and a reminder. The recipient sees their name on every page and knows the document is tracked to them. This psychological deterrent is often more effective than technical expiration mechanisms because it operates on social pressure rather than technical enforcement. Even if the JavaScript expiration is defeated by disabling JavaScript, the personalized watermark remains.
Try Protect PDF
No installation needed. Works directly in your browser.
