While Prevent Direct Access Gold prevents your private files from being shared without your permission, Watermark WordPress Files helps you display protected PDF files in content and stops all download attempts at the same time.
Protect self-hosted PDF Files
- Watermark WordPress Files version 1.0.0 and greater
- Prevent Direct Access Gold version 3.1.2 and greater
Self-hosted PDF files refer to all files uploaded to your hosting server instead of external storage such as Amazon S3, Dropbox or Wasabi.
To protect your PDF files against downloads, simply follow our steps below.
Step 1: Embed your PDF files into content using our “Protected PDF” button in Classic Editor or “Protected PDF” block in Gutenberg Editor.
You can also use our shortcode as follows:
[pda_pdf_viewer id=2454 width="500" height="725"]
Step 2: Protect PDF files against direct access by our Prevent Direct Access (PDA) Gold plugin.
Simply tick the “Protect this file” checkbox and define file access permission under your file name before adding it into content.
Alternatively, you can protect files under Media Library first if it’s more convenient for you.
Once you’re done, no one including authorized users, can download your PDF files.
Multiple PDF viewers on the same page are now supported.
Protect PDF Files hosted on Amazon S3 bucket
- Watermark WordPress Files version 1.2.0 or greater
- Prevent Direct Access Gold 3.1.5 or greater
- PDA Amazon S3 Integration extension version 1.1.6 or greater
Follow 3 simple steps below to protect PDF files hosted on Amazon S3 against downloads.
Step 1: Connect our PDA S3 Integration extension with your S3 bucket.
Step 2: Modify expiration time for S3 pre-signed URLs. It’s highly recommended to set a short expiration time, e.g. 5 seconds.
Step 3: Embed your S3 PDF files into content using our shortcode:
Technically, when you protect S3 files by setting it private, they will be accessed directly by no one. To display them in content, our plugin needs permission to connect with your S3 bucket and automatically generate S3 signed URLs, which allows your users to see the file content in a period of time. The new S3 signed URL will be automatically generated and replaced the previous expired one. Therefore, your users can see the whole PDF without any interruption.
What’s more, by setting the expiration time too short, e.g. 5 seconds, you can stop most download tools from downloading your private files.