PDF Security & Access Issues

How to Create a Click-Through Agreement PDF in Adobe Acrobat DC

Phi Hung VoPhi Hung Vo Oct 28, 2026 869 views

Question details

The user wants to set up a click-through agreement dialog that prompts readers to accept terms upon opening a PDF document in Acrobat DC.

How to Create a Click-Through Agreement PDF in Adobe Acrobat DC
Product
Adobe Acrobat DC
Device & OS
not provided
Scenario
Distributing a PDF document that requires the reader to explicitly agree to specific terms and conditions before they are allowed to access the file's content.
Observed behavior
The desired state is an interactive prompt displaying the agreement upon file open, which either allows access if accepted or closes the file if declined, utilizing JavaScript.
Before you start

Ensure you have the exact JavaScript code for your agreement prompt ready, and create a backup copy of your PDF before adding custom scripts.

Solution 1Recommended

Add a Document-Level JavaScript for the Agreement Prompt

Using a Document-Level script ensures the click-through prompt only runs once when the PDF is initially opened, rather than every time a specific page is visited.

Adobe Acrobat DC supports standard JavaScript features, including those found in older tutorials. To create a seamless click-through experience, the script must be applied at the document level. If applied at the page level, the script will re-trigger annoyingly every time the user navigates back to that page.

1
Open JavaScript Tools

Open your PDF file in Adobe Acrobat DC. Navigate to the top menu, click on 'Tools', scroll down to the 'Customize' section, and select 'JavaScript'.

2
Access Document JavaScripts

In the JavaScript toolbar, click on 'Document JavaScripts'. This opens the dialog box where you can manage scripts that affect the entire file.

3
Create a New Script

Type a descriptive name for your script (e.g., 'AgreementPrompt') in the 'Script Name' field and click the 'Add' button.

4
Paste the Agreement Code

Delete any default code in the editor, then paste your customized click-through agreement JavaScript code. Ensure your code includes the dialog setup and logic to close the document if the user declines.

5
Save and Test

Click 'OK' to close the editor, then save and close the PDF. Reopen the PDF file to test the agreement dialog and verify it works as intended.

Add a Document-Level JavaScript for the Agreement Prompt
Avoid Page-Level Actions: Do not attach the agreement script to a 'Page Open' action. Doing so will cause the dialog box to appear every single time the user navigates back to that specific page during their reading session.
Free Microsoft Office alternative

Secure and Manage PDFs Easily with WPS Office

While adding JavaScript provides custom prompts, standard PDF security doesn't have to be complicated. WPS Office is a free, lightweight, and highly compatible alternative that allows you to easily protect PDFs with passwords and permissions, without writing a single line of code.

  1. 1. Download and Install: Visit the official WPS Office website to download the free installation package for your operating system.
  2. 2. Open Your PDF: Launch WPS Office and open the PDF document you want to secure.
  3. 3. Apply Password Protection: Navigate to the 'Protect' tab and select 'Encrypt' to easily set open passwords and restrict editing permissions.
Highly compatible with Microsoft Word, Excel, PowerPoint, and standard Adobe PDF formats.Built-in PDF encryption allows you to restrict unauthorized opening, editing, or printing effortlessly.Free, lightweight, and fast-loading alternative to expensive and heavy software.Familiar user interface ensures a smooth transition and seamless document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my PDF agreement dialog appear every time I change pages?

If you added the JavaScript to a 'Page Open' action rather than as a Document-Level JavaScript, the script will trigger every time that specific page is rendered. Move the script to Tools > JavaScript > Document JavaScripts to fix this behavior.

Can I use older JavaScript tutorials for Acrobat DC?

Yes, Adobe Acrobat DC still supports the core JavaScript APIs and features used in older Acrobat versions, so legacy click-through agreement scripts generally still function perfectly.

Is it possible to lock the PDF if the user clicks 'Decline'?

Yes, your JavaScript can be written to invoke the `this.closeDoc()` method, which automatically closes the PDF file immediately if the user chooses not to accept the terms in the dialog box.

Do click-through PDFs work in all PDF readers?

No. The click-through dialog relies on JavaScript execution, which is fully supported in Adobe Acrobat but may be disabled by default or completely unsupported in some third-party PDF readers and web browser viewers.